exception

package
v0.0.0-...-d817ec6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Copyright 2019-2020 Axetroy. All rights reserved. Apache License 2.0.

Copyright 2019-2020 Axetroy. All rights reserved. Apache License 2.0.

Index

Constants

This section is empty.

Variables

View Source
var (
	SystemMaintenance = New("系统维护中", -1)
	Unknown           = New("未知错误", 0)
	DataBase          = New("数据库错误", 100)
	DataBinding       = New("数据转换错误", 101)
	InvalidParams     = New("参数不正确", 100000)
	NoData            = New("找不到数据", 100001)
	NoPermission      = New("没有权限", 100002)
	InvalidFormat     = New("格式不正确", 100003)
	Duplicate         = New("重复", 100004)
	InvalidAuth       = New("无效的身份认证方式", 999999)
	InvalidToken      = New("无效的身份令牌", 999999)
	TokenExpired      = New("身份令牌已过期", 999999)

	// 用户类
	UserNotExist             = New("用户不存在", 200000)
	UserExist                = New("用户已存在", 200001)
	UserIsInActive           = New("帐号未激活", 200003)
	UserHaveBeenBan          = New("帐号已被禁用", 200004)
	PasswordDuplicate        = New("新密码和旧密码不能相同", 200005)
	InvalidAccountOrPassword = New("账号或密码错误", 200006)
	InvalidPassword          = New("密码错误", 200012)
)

Functions

This section is empty.

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

func New

func New(text string, code int) Error

func (Error) Code

func (e Error) Code() int

func (Error) Error

func (e Error) Error() string

func (Error) New

func (e Error) New(msg string) Error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL