Skip to content

Commit

Permalink
style: log with error
Browse files Browse the repository at this point in the history
  • Loading branch information
tr1v3r committed Aug 26, 2022
1 parent 3f76da8 commit 587ed13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion do.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (d *DO) UseModel(model interface{}) {

err := d.db.Statement.Parse(model)
if err != nil {
panic(fmt.Errorf("Cannot parse model: %+v", model))
panic(fmt.Errorf("Cannot parse model: %+v\n%w", model, err))
}
d.schema = d.db.Statement.Schema
}
Expand Down

0 comments on commit 587ed13

Please sign in to comment.