优化code reason

This commit is contained in:
2023-11-05 01:15:16 +08:00
parent be993da6db
commit c293dcfa7f
3 changed files with 12 additions and 34 deletions

View File

@ -15,13 +15,13 @@ package exception
type IException interface {
// Error 兼容 go 内置 error
Error() string
// GetCode *获取错误码
// GetCode 获取错误码
GetCode() interface{}
// GetMessage *获取错误信息
GetMessage() string
// GetData 获取异常时的返回数据
GetData() interface{}
// GetHttpCode *获取当前异常要返回的http状态码, 不设置则 默认 200
// GetHttpCode 获取当前异常要返回的http状态码, 不设置则 默认 200
GetHttpCode() int
// ToError 转换为内置error类型
ToError() error