From e32d9aa984211910824e169e319ed0df432d86b4 Mon Sep 17 00:00:00 2001 From: Albert Pham Date: Sat, 22 Jun 2013 11:02:25 -0700 Subject: Print a stack trace when attaching fails. --- src/main/java/com/sk89q/warmroast/WarmRoast.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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 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); } } -- cgit