优化casbin接口鉴权问题,不再重复查询数据库

This commit is contained in:
linwenxiang committed 2020-09-21 11:39:19 +08:00
1 parent a06bd289b3
commit a8d5846483
4 files changed
+24 -4

No files matched your search

+1 -1
View File
@@ -53,7 +53,7 @@ func HasError(err error, msg string, code ...int) {
msg = err.Error()
}
_, file, line, _ := runtime.Caller(1)
log.Printf("%s:%v", file, line)
log.Printf("%s:%v error: %#v", file, line, err)
panic("CustomError#" + strconv.Itoa(statusCode) + "#" + msg)
}
}