add missing path property handling

This commit is contained in:
Jeffrey Duroyon
2020-05-18 00:56:43 +02:00
parent ca8e42388b
commit f6e0a826a1
21 changed files with 292 additions and 114 deletions

View File

@@ -12,19 +12,19 @@ const (
ErrTypeForeignKeyViolation
)
type DAOError struct {
type Error struct {
Cause error
Type Type
}
func NewDAOError(t Type, cause error) error {
return &DAOError{
return &Error{
Type: t,
Cause: cause,
}
}
func (e *DAOError) Error() string {
func (e *Error) Error() string {
if e.Cause != nil {
return fmt.Sprintf("Type %d: %s", e.Type, e.Cause.Error())
}