improve error message for package gdb
@@ -128,15 +128,6 @@ func (c *Core) DoFilter(ctx context.Context, link Link, sql string, args []inter
return sql, args, nil
}
-type sqlParsingHandlerInput struct {
- DoCommitInput
- FormattedSql string
-}
-
-type sqlParsingHandlerOutput struct {
- DoCommitInput
-}
-
// DoCommit commits current sql and arguments to underlying sql driver.
func (c *Core) DoCommit(ctx context.Context, in DoCommitInput) (out DoCommitOutput, err error) {
// Inject internal data into ctx, especially for transaction creating.
@@ -266,7 +257,7 @@ func (c *Core) DoCommit(ctx context.Context, in DoCommitInput) (out DoCommitOutp
if err != nil && err != sql.ErrNoRows {
err = gerror.NewCodef(
gcode.CodeDbOperationError,
- "%s, %s\n",
+ "%s, %s",
err.Error(),
FormatSqlWithArgs(in.Sql, in.Args),
)
