From faa02483f15ac0ffc2a0bbf31e12a5bf61b6c319 Mon Sep 17 00:00:00 2001 From: steden <1470804@qq.com> Date: Tue, 26 Dec 2023 22:06:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=93=BE=E8=B7=AF=E8=BF=BD?= =?UTF-8?q?=E8=B8=AA=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trace/baseTraceDetail.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/trace/baseTraceDetail.go b/trace/baseTraceDetail.go index 4493a906b..d36e85f22 100644 --- a/trace/baseTraceDetail.go +++ b/trace/baseTraceDetail.go @@ -30,15 +30,15 @@ type BaseTraceDetail struct { } type ExceptionStack struct { - CallFile string // 调用者文件路径 - CallLine int // 调用者行号 - CallFuncName string // 调用者函数名称 - IsException bool // 是否执行异常 - ExceptionMessage string // 异常信息 + ExceptionCallFile string // 调用者文件路径 + ExceptionCallLine int // 调用者行号 + ExceptionCallFuncName string // 调用者函数名称 + ExceptionIsException bool // 是否执行异常 + ExceptionMessage string // 异常信息 } func (receiver ExceptionStack) IsNil() bool { - return receiver.CallFile == "" && receiver.CallLine == 0 && receiver.CallFuncName == "" && receiver.IsException == false && receiver.ExceptionMessage == "" + return receiver.ExceptionCallFile == "" && receiver.ExceptionCallLine == 0 && receiver.ExceptionCallFuncName == "" && receiver.ExceptionIsException == false && receiver.ExceptionMessage == "" } func (receiver *BaseTraceDetail) SetSql(connectionString string, dbName string, tableName string, sql string, rowsAffected int64) { @@ -50,10 +50,10 @@ func (receiver *BaseTraceDetail) End(err error) { receiver.UseTs = time.Duration(receiver.EndTs-receiver.StartTs) * time.Microsecond if err != nil { - receiver.Exception.IsException = true + receiver.Exception.ExceptionIsException = true receiver.Exception.ExceptionMessage = err.Error() // 调用者 - receiver.Exception.CallFile, receiver.Exception.CallFuncName, receiver.Exception.CallLine = GetCallerInfo() + receiver.Exception.ExceptionCallFile, receiver.Exception.ExceptionCallFuncName, receiver.Exception.ExceptionCallLine = GetCallerInfo() } // 移除层级