diff --git a/scripts/common.sh b/scripts/common.sh index 6d70a0840..da5b2d2ef 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -138,24 +138,30 @@ function msg_on_error() rm "$stdout_file" "$stderr_file" return 0 else - printError "Command failed: $SOLC ${command[*]}" + printError "" + printError "Command failed: ${error_message}" + printError " command: $SOLC ${command[*]}" if [[ -s "$stdout_file" ]] then - printError "stdout:" + printError "--- stdout ---" + printError "-----------" >&2 cat "$stdout_file" + printError "--------------" else - printError "stdout: " + printError " stdout: " fi if [[ -s "$stderr_file" ]] then - printError "stderr:" + printError "--- stderr ---" >&2 cat "$stderr_file" + printError "--------------" else - printError "stderr: " + printError " stderr: " fi - printError "$error_message" rm "$stdout_file" "$stderr_file" + + printStackTrace return 1 fi }