reform icon indicating copy to clipboard operation
reform copied to clipboard

Better errors

Open AlekSi opened this issue 8 years ago • 2 comments

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.

AlekSi avatar May 13 '16 09:05 AlekSi

sql: Scan error on column index 18: unsupported Scan, storing driver.Value type <nil> into type *string we can write normal index value =)

eaglemoor avatar Jun 06 '16 14:06 eaglemoor

In that case we can't, it comes from database/sql, not from reform.

AlekSi avatar Jun 06 '16 14:06 AlekSi