From 1525623ccd5da3e4d45b77a2650fd3f831e88ca8 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 21 Dec 2013 06:51:59 +0000 Subject: [PATCH] * display errors correctly --- source/net/sourceforge/filebot/cli/GroovyPad.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/net/sourceforge/filebot/cli/GroovyPad.java b/source/net/sourceforge/filebot/cli/GroovyPad.java index f233ec66..541d7966 100644 --- a/source/net/sourceforge/filebot/cli/GroovyPad.java +++ b/source/net/sourceforge/filebot/cli/GroovyPad.java @@ -237,7 +237,10 @@ public class GroovyPad extends JFrame { shell.evaluate("println();", binding, true); } } catch (ScriptException e) { - e.getCause().getCause().printStackTrace(); + while (e.getCause() instanceof ScriptException) { + e = (ScriptException) e.getCause(); + } + e.printStackTrace(); } catch (Throwable e) { e.printStackTrace(); }