Merge branch 'master' of github.com:processing/processing

This commit is contained in:
Ben Fry
2016-02-13 17:33:54 -05:00

View File

@@ -747,6 +747,12 @@ public class Runner implements MessageConsumer {
// This shouldn't happen, but if it does, print the exception in case
// it's something that needs to be debugged separately.
e.printStackTrace(sketchErr);
} catch (Exception e) {
// stack overflows seem to trip in frame.location() above
// ignore this case so that the actual error gets reported to the user
if ("StackOverflowError".equals(message) == false) {
e.printStackTrace(sketchErr);
}
}
// before giving up, try to extract from the throwable object itself
// since sometimes exceptions are re-thrown from a different context
@@ -778,7 +784,11 @@ public class Runner implements MessageConsumer {
or.invokeMethod(thread, method, new ArrayList<Value>(), ObjectReference.INVOKE_SINGLE_THREADED);
} catch (Exception e) {
e.printStackTrace(sketchErr);
// stack overflows will make the exception handling above trip again
// ignore this case so that the actual error gets reported to the user
if ("StackOverflowError".equals(message) == false) {
e.printStackTrace(sketchErr);
}
}
// Give up, nothing found inside the pile of stack frames
SketchException rex = new SketchException(message);