Include process exit code in toString() representation of PyExecutionException
authorMikhail Golubev <mikhail.golubev@jetbrains.com>
Mon, 8 Aug 2016 12:14:31 +0000 (15:14 +0300)
committerMikhail Golubev <mikhail.golubev@jetbrains.com>
Mon, 8 Aug 2016 12:42:44 +0000 (15:42 +0300)
since it's often wrapped in IOException() and its constructor
creates the message as "cause.toString()", thus error code might
get lost in the logs eventually.

python/openapi/src/com/jetbrains/python/packaging/PyExecutionException.java

index 63ac3a7f2388c47c890180227321d233b3fc9829..23a4d91b02fea52b04fb3980166e0a79d55695fd 100644 (file)
@@ -61,6 +61,7 @@ public class PyExecutionException extends ExecutionException {
     final String command = getCommand() + " " + StringUtil.join(getArgs(), " ");
     b.append(command);
     b.append("\n\n");
     final String command = getCommand() + " " + StringUtil.join(getArgs(), " ");
     b.append(command);
     b.append("\n\n");
+    b.append("The exit code: ").append(myExitCode).append("\n");
     b.append("The error output of the command:\n\n");
     b.append(myStdout);
     b.append("\n");
     b.append("The error output of the command:\n\n");
     b.append(myStdout);
     b.append("\n");