diff options
author | Albert Pham <the.sk89q@gmail.com> | 2013-06-22 11:02:25 -0700 |
---|---|---|
committer | Albert Pham <the.sk89q@gmail.com> | 2013-06-22 11:02:25 -0700 |
commit | e32d9aa984211910824e169e319ed0df432d86b4 (patch) | |
tree | 54ad885ca814321f71fc7fd8d48a4f548d8c3627 /src | |
parent | 6c93fd8741a3e26b64eec5804f4d52ca28c900f8 (diff) | |
download | spark-e32d9aa984211910824e169e319ed0df432d86b4.tar.gz spark-e32d9aa984211910824e169e319ed0df432d86b4.tar.bz2 spark-e32d9aa984211910824e169e319ed0df432d86b4.zip |
Print a stack trace when attaching fails.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/sk89q/warmroast/WarmRoast.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/sk89q/warmroast/WarmRoast.java b/src/main/java/com/sk89q/warmroast/WarmRoast.java index d437c61..9923cb8 100644 --- a/src/main/java/com/sk89q/warmroast/WarmRoast.java +++ b/src/main/java/com/sk89q/warmroast/WarmRoast.java @@ -222,6 +222,7 @@ public class WarmRoast extends TimerTask { System.err.println("Attaching to PID " + opt.pid + "..."); } catch (AttachNotSupportedException | IOException e) { System.err.println("Failed to attach VM by PID " + opt.pid); + e.printStackTrace(); System.exit(1); } } else if (opt.vmName != null) { @@ -234,6 +235,7 @@ public class WarmRoast extends TimerTask { break; } catch (AttachNotSupportedException | IOException e) { System.err.println("Failed to attach VM by name '" + opt.vmName + "'"); + e.printStackTrace(); System.exit(1); } } @@ -241,7 +243,6 @@ public class WarmRoast extends TimerTask { } if (vm == null) { - List<VirtualMachineDescriptor> descriptors = VirtualMachine.list(); System.err.println("Choose a VM:"); @@ -286,6 +287,7 @@ public class WarmRoast extends TimerTask { } catch (AttachNotSupportedException | IOException e) { System.err.println(""); System.err.println("Failed to attach VM"); + e.printStackTrace(); System.exit(1); } } |