reform
reform copied to clipboard
Better errors
Errors should be structures to have more context. Something like:
type ReformError struct {
Op string
Query string
// args?
Err error
}
func (re *ReformError) Error() string { }
func (re *ReformError) Cause() error { return re.Err }
Cause()
is useful for https://godoc.org/github.com/pkg/errors#hdr-Retrieving_the_cause_of_an_error.
sql: Scan error on column index 18: unsupported Scan, storing driver.Value type <nil> into type *string
we can write normal index value =)
In that case we can't, it comes from database/sql
, not from reform.