Skip to content

Commit 3b1b9a0

Browse files
committed
common.sh: Adjust formatting in msg_on_error() and add stack trace
1 parent b85172b commit 3b1b9a0

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
@@ -138,24 +138,30 @@ function msg_on_error()
138138
rm "$stdout_file" "$stderr_file"
139139
return 0
140140
else
141-
printError "Command failed: $SOLC ${command[*]}"
141+
printError ""
142+
printError "Command failed: ${error_message}"
143+
printError " command: $SOLC ${command[*]}"
142144
if [[ -s "$stdout_file" ]]
143145
then
144-
printError "stdout:"
146+
printError "--- stdout ---"
147+
printError "-----------"
145148
>&2 cat "$stdout_file"
149+
printError "--------------"
146150
else
147-
printError "stdout: <EMPTY>"
151+
printError " stdout: <EMPTY>"
148152
fi
149153
if [[ -s "$stderr_file" ]]
150154
then
151-
printError "stderr:"
155+
printError "--- stderr ---"
152156
>&2 cat "$stderr_file"
157+
printError "--------------"
153158
else
154-
printError "stderr: <EMPTY>"
159+
printError " stderr: <EMPTY>"
155160
fi
156161

157-
printError "$error_message"
158162
rm "$stdout_file" "$stderr_file"
163+
164+
printStackTrace
159165
return 1
160166
fi
161167
}

0 commit comments

Comments
 (0)