| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -749,6 +749,12 @@ protected SketchException findException(String message, ObjectReference or, Thre | |||
| 749 | 749 | // This shouldn't happen, but if it does, print the exception in case | |
| 750 | 750 | // it's something that needs to be debugged separately. | |
| 751 | 751 | e.printStackTrace(sketchErr); | |
| 752 | + } catch (Exception e) { | ||
| 753 | + // stack overflows seem to trip in frame.location() above | ||
| 754 | + // ignore this case so that the actual error gets reported to the user | ||
| 755 | + if ("StackOverflowError".equals(message) == false) { | ||
| 756 | + e.printStackTrace(sketchErr); | ||
| 757 | + } | ||
| 752 | 758 | } | |
| 753 | 759 | // before giving up, try to extract from the throwable object itself | |
| 754 | 760 | // since sometimes exceptions are re-thrown from a different context | |
@@ -780,7 +786,11 @@ protected SketchException findException(String message, ObjectReference or, Thre | |||
| 780 | 786 | or.invokeMethod(thread, method, new ArrayList<Value>(), ObjectReference.INVOKE_SINGLE_THREADED); | |
| 781 | 787 | ||
| 782 | 788 | } catch (Exception e) { | |
| 783 | - e.printStackTrace(sketchErr); | ||
| 789 | + // stack overflows will make the exception handling above trip again | ||
| 790 | + // ignore this case so that the actual error gets reported to the user | ||
| 791 | + if ("StackOverflowError".equals(message) == false) { | ||
| 792 | + e.printStackTrace(sketchErr); | ||
| 793 | + } | ||
| 784 | 794 | } | |
| 785 | 795 | // Give up, nothing found inside the pile of stack frames | |
| 786 | 796 | SketchException rex = new SketchException(message); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments