接口非成功打印异常堆栈
- 接口非成功打印异常堆栈 - 支持开关控制是否打印
This commit is contained in:
@ -10,6 +10,7 @@ package response
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"runtime/debug"
|
||||
"time"
|
||||
|
||||
"git.zhangdeman.cn/zhangdeman/exception"
|
||||
@ -107,6 +108,9 @@ func SendWithException(ctx *gin.Context, e exception.IException, data any) {
|
||||
if nil == e {
|
||||
e = exception.NewSuccess(data)
|
||||
}
|
||||
if !define.GetHttpHandleConfig().DisableDebugStackOutput {
|
||||
debug.PrintStack()
|
||||
}
|
||||
outputData := map[string]any{
|
||||
"e_data": e.GetData(),
|
||||
"u_e_data": data,
|
||||
|
Reference in New Issue
Block a user