REPL: display the original cause of InvocationTargetException

This commit is contained in:
Alexander Udalov
2014-07-27 17:48:44 -07:00
parent 6eb5567895
commit 5beefac5bc
@@ -276,7 +276,7 @@ public class ReplInterpreter {
scriptInstance = scriptInstanceConstructor.newInstance(constructorArgs);
}
catch (Throwable e) {
return LineResult.error(Throwables.getStackTraceAsString(e));
return LineResult.error(Throwables.getStackTraceAsString(e.getCause()));
}
Field rvField = scriptClass.getDeclaredField("rv");
rvField.setAccessible(true);