Skip to content

Commit

Permalink
Return "generic" error if a function returns an error state but does …
Browse files Browse the repository at this point in the history
…not set error_code

Close dominikh#13

The underlying problem is documented in
- hercules-team/augeas#464
  • Loading branch information
hillu committed May 12, 2017
1 parent ca62e35 commit 4cd8f5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion error.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (err Error) Error() string {
func (a Augeas) error() error {
code := a.errorCode()
if code == NoError {
return nil
return Error{ECMDRUN, "Failed to execute command", "", ""}
}

return Error{code, a.errorMessage(), a.errorMinorMessage(), a.errorDetails()}
Expand Down

0 comments on commit 4cd8f5e

Please sign in to comment.