Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-cli
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Operations
Operations
Metrics
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-cli
Commits
eb9a9243
Commit
eb9a9243
authored
Jul 30, 2018
by
Cristian Maglie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reformatted errors
parent
b7fea652
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
common/formatter/errors.go
common/formatter/errors.go
+1
-1
common/formatter/errors_test.go
common/formatter/errors_test.go
+2
-1
No files found.
common/formatter/errors.go
View file @
eb9a9243
...
...
@@ -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.
...
...
common/formatter/errors_test.go
View file @
eb9a9243
...
...
@@ -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"}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment