Skip to content

Commit

Permalink
db: print dbutil.go error in stderr (#4712)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldiamant authored Oct 31, 2022
1 parent 7602d4f commit fb1f498
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/db/dbutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"database/sql"
"errors"
"fmt"
"os"
"reflect"
"runtime"
"strings"
Expand Down Expand Up @@ -232,7 +233,7 @@ func (db *Accessor) atomic(fn idemFn, extras ...interface{}) (err error) {
buf := make([]byte, 16*1024)
stlen := runtime.Stack(buf, false)
errstr := string(buf[:stlen])
fmt.Printf("recovered panic in atomic: %s", errstr)
fmt.Fprintf(os.Stderr, "recovered panic in atomic: %s", errstr)

}
}()
Expand Down

0 comments on commit fb1f498

Please sign in to comment.