Skip to content

Commit

Permalink
Update Error method return string format; update test
Browse files Browse the repository at this point in the history
  • Loading branch information
electrofocus committed Oct 31, 2022
1 parent b524ddf commit dc9eaee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion errchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (c chain) Error() string {
return c.error.Error()
}

return c.error.Error() + "; " + c.next.Error()
return c.error.Error() + " (" + c.next.Error() + ")"
}

// Is allows to check the chain for compliance with any error.
Expand Down
2 changes: 1 addition & 1 deletion errchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestNewAndError(t *testing.T) {
errors.New("3"),
},
expectNil: false,
expectedText: "1; 2; 3",
expectedText: "1 (2 (3))",
},
{
name: "one err",
Expand Down

0 comments on commit dc9eaee

Please sign in to comment.