Permalink
Browse files

better error tracing in HipervisorUtils.checkReturnValue

  • Loading branch information...
1 parent 796ffeb commit e60ce5d923cd9ff791edddd7fe83022029dd148b @abmargb abmargb committed Mar 15, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/org/ourgrid/virt/strategies/HypervisorUtils.java
@@ -41,8 +41,11 @@ public static void runAndCheckProcess(ProcessBuilder processBuilder)
*/
public static void checkReturnValue(ExecutionResult executionResult)
throws Exception {
- if (executionResult.getReturnValue() != ExecutionResult.OK) {
- throw new Exception(executionResult.getStdErr().toString());
+ int exitValue = executionResult.getReturnValue();
+ if (exitValue != ExecutionResult.OK) {
+ throw new Exception("Exit value: " + exitValue + ", StdErr: "
+ + executionResult.getStdErr().toString() + ", StdOut: "
+ + executionResult.getStdOut().toString());
}
}

0 comments on commit e60ce5d

Please sign in to comment.