Skip to content

Commit 218f505

Browse files
committed
common.sh: Adjust formatting in msg_on_error() and add stack trace
1 parent d276e8e commit 218f505

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

scripts/common.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,24 +130,30 @@ function msg_on_error()
130130
rm "$stdout_file" "$stderr_file"
131131
return 0
132132
else
133-
printError "Command failed: $SOLC ${command[*]}"
133+
printError ""
134+
printError "Command failed: ${error_message}"
135+
printError " command: $SOLC ${command[*]}"
134136
if [[ -s "$stdout_file" ]]
135137
then
136-
printError "stdout:"
138+
printError "--- stdout ---"
139+
printError "-----------"
137140
>&2 cat "$stdout_file"
141+
printError "--------------"
138142
else
139-
printError "stdout: <EMPTY>"
143+
printError " stdout: <EMPTY>"
140144
fi
141145
if [[ -s "$stderr_file" ]]
142146
then
143-
printError "stderr:"
147+
printError "--- stderr ---"
144148
>&2 cat "$stderr_file"
149+
printError "--------------"
145150
else
146-
printError "stderr: <EMPTY>"
151+
printError " stderr: <EMPTY>"
147152
fi
148153

149-
printError "$error_message"
150154
rm "$stdout_file" "$stderr_file"
155+
156+
printStackTrace
151157
return 1
152158
fi
153159
}

0 commit comments

Comments
 (0)