提交 aefe21b6 编写于 作者: J jianzhiyao

complete error log

上级 32da446e
......@@ -558,10 +558,14 @@ func (o *orm) DoTxWithCtxAndOpts(ctx context.Context, opts *sql.TxOptions, task
defer func() {
if panicked || err != nil {
e := _txOrm.Rollback()
logs.Error("rollback transaction failed: %v", e)
if e != nil {
logs.Error("rollback transaction failed: %v,%v", e, panicked)
}
} else {
e := _txOrm.Commit()
logs.Error("commit transaction failed: %v", e)
if e != nil {
logs.Error("commit transaction failed: %v,%v", e, panicked)
}
}
}()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册