update debug strack
This commit is contained in:
parent
99ea9ba111
commit
36d4ca844a
@ -10,7 +10,7 @@ package response
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"runtime/debug"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.zhangdeman.cn/zhangdeman/exception"
|
"git.zhangdeman.cn/zhangdeman/exception"
|
||||||
@ -109,7 +109,10 @@ func SendWithException(ctx *gin.Context, e exception.IException, data any) {
|
|||||||
e = exception.NewSuccess(data)
|
e = exception.NewSuccess(data)
|
||||||
}
|
}
|
||||||
if !define.GetHttpHandleConfig().DisableDebugStackOutput {
|
if !define.GetHttpHandleConfig().DisableDebugStackOutput {
|
||||||
debug.PrintStack()
|
pc, file, line, ok := runtime.Caller(1)
|
||||||
|
if ok {
|
||||||
|
fmt.Println(runtime.FuncForPC(pc).Name(), file, line)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
outputData := map[string]any{
|
outputData := map[string]any{
|
||||||
"e_data": e.GetData(),
|
"e_data": e.GetData(),
|
||||||
|
Loading…
Reference in New Issue
Block a user