Skip to content

Commit

Permalink
Use own error type for returning error
Browse files Browse the repository at this point in the history
  • Loading branch information
jrauh01 committed Dec 9, 2024
1 parent 211943d commit a4cada5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/query_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (qb *queryBuilder) DeleteStatement(stmt DeleteStatement) (string, error) {
if where != "" {
where = fmt.Sprintf(" WHERE %s", where)
} else {
return "", errors.New("cannot use DeleteStatement() without where statement - use DeleteAllStatement() instead")
return "", fmt.Errorf("%w: %s", ErrMissingStatementPart, "cannot use DeleteStatement() without where statement - use DeleteAllStatement() instead")
}

return fmt.Sprintf(
Expand Down

0 comments on commit a4cada5

Please sign in to comment.