Commit eb9a9243 authored by Cristian Maglie's avatar Cristian Maglie

Reformatted errors

parent b7fea652
......@@ -62,7 +62,7 @@ func (err ErrorMessage) String() string {
if err.CausedBy == nil {
return err.Message
}
return err.Message + " (" + err.CausedBy.Error() + ")"
return "Error: " + err.CausedBy.Error() + "\n" + err.Message
}
// PrintErrorMessage formats and prints info about an error message.
......
......@@ -43,7 +43,8 @@ func ExamplePrintError() {
// Output:
// error message
// outer error message (inner error message)
// Error: inner error message
// outer error message
// {"Message":"error message","Cause":""}
// {"Message":"outer error message","Cause":"inner error message"}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment