升级异常处理
This commit is contained in:
parent
c80236b3a2
commit
53b9196970
2
go.mod
2
go.mod
@ -2,7 +2,7 @@ module git.zhangdeman.cn/zhangdeman/gin
|
||||
|
||||
go 1.17
|
||||
|
||||
require git.zhangdeman.cn/zhangdeman/exception v0.0.0-20220626052433-f29c21f923fc
|
||||
require git.zhangdeman.cn/zhangdeman/exception v0.0.0-20220703050824-0679ce509241
|
||||
|
||||
require (
|
||||
git.zhangdeman.cn/zhangdeman/util v0.0.0-20220625151616-cfe1f4c04db4 // indirect
|
||||
|
2
go.sum
2
go.sum
@ -6,6 +6,8 @@ git.zhangdeman.cn/zhangdeman/exception v0.0.0-20220626050013-dce8cafff2c6 h1:+hA
|
||||
git.zhangdeman.cn/zhangdeman/exception v0.0.0-20220626050013-dce8cafff2c6/go.mod h1:mIMM/t9BkrKHAcDCmarLCHQhHfWf0/ZjtcqJPboqmSA=
|
||||
git.zhangdeman.cn/zhangdeman/exception v0.0.0-20220626052433-f29c21f923fc h1:cD0sibF3bDr3+qpGmimmuLEqNNFdpY2VDk2+EdSeSYE=
|
||||
git.zhangdeman.cn/zhangdeman/exception v0.0.0-20220626052433-f29c21f923fc/go.mod h1:mIMM/t9BkrKHAcDCmarLCHQhHfWf0/ZjtcqJPboqmSA=
|
||||
git.zhangdeman.cn/zhangdeman/exception v0.0.0-20220703050824-0679ce509241 h1:tBaET7SL1ElDQ8mI3A0sHNonmycB0fFp3n8vWo410YM=
|
||||
git.zhangdeman.cn/zhangdeman/exception v0.0.0-20220703050824-0679ce509241/go.mod h1:mIMM/t9BkrKHAcDCmarLCHQhHfWf0/ZjtcqJPboqmSA=
|
||||
git.zhangdeman.cn/zhangdeman/util v0.0.0-20220609072516-022a755fdf2f h1:yAxxukVUdSM5wn264el+QiAEB0OBN/5H7Xw9Z6rLzUY=
|
||||
git.zhangdeman.cn/zhangdeman/util v0.0.0-20220609072516-022a755fdf2f/go.mod h1:YI/XeTmrr9+8dxa4ThPkmNcEE8WHG5pZkKujpSWwIxM=
|
||||
git.zhangdeman.cn/zhangdeman/util v0.0.0-20220625151616-cfe1f4c04db4 h1:uHYTRztH/XEVtr3FLykCf/3LhFQ7zQHnzVAeDyC1huQ=
|
||||
|
@ -58,7 +58,7 @@ func SendWithStatusOK(ctx *gin.Context, code interface{}, data map[string]interf
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 13:08 2022/6/26
|
||||
func SendWithException(ctx *gin.Context, e *exception.Exception, data interface{}) {
|
||||
func SendWithException(ctx *gin.Context, e exception.IException, data interface{}) {
|
||||
if nil == e {
|
||||
e = exception.NewSuccess(data)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user