mirror of
https://gitee.com/johng/gf.git
synced 2024-11-29 18:57:44 +08:00
gdb error should wrap original underlying database error like MySQLError (#2402)
This commit is contained in:
parent
013f8b216a
commit
005668aca8
@ -279,10 +279,9 @@ func (c *Core) DoCommit(ctx context.Context, in DoCommitInput) (out DoCommitOutp
|
||||
c.writeSqlToLogger(ctx, sqlObj)
|
||||
}
|
||||
if err != nil && err != sql.ErrNoRows {
|
||||
err = gerror.NewCodef(
|
||||
err = gerror.WrapCode(
|
||||
gcode.CodeDbOperationError,
|
||||
"%s, %s",
|
||||
err.Error(),
|
||||
err,
|
||||
FormatSqlWithArgs(in.Sql, in.Args),
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user