mirror of
https://github.com/astaxie/beego.git
synced 2024-11-24 13:30:54 +00:00
complete error log
This commit is contained in:
parent
32da446eb1
commit
aefe21b63a
@ -558,10 +558,14 @@ func (o *orm) DoTxWithCtxAndOpts(ctx context.Context, opts *sql.TxOptions, task
|
|||||||
defer func() {
|
defer func() {
|
||||||
if panicked || err != nil {
|
if panicked || err != nil {
|
||||||
e := _txOrm.Rollback()
|
e := _txOrm.Rollback()
|
||||||
logs.Error("rollback transaction failed: %v", e)
|
if e != nil {
|
||||||
|
logs.Error("rollback transaction failed: %v,%v", e, panicked)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
e := _txOrm.Commit()
|
e := _txOrm.Commit()
|
||||||
logs.Error("commit transaction failed: %v", e)
|
if e != nil {
|
||||||
|
logs.Error("commit transaction failed: %v,%v", e, panicked)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user