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