summaryrefslogtreecommitdiff
path: root/src/main/java/cuchaz/enigma/ExceptionIgnorer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cuchaz/enigma/ExceptionIgnorer.java')
-rw-r--r--src/main/java/cuchaz/enigma/ExceptionIgnorer.java35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/main/java/cuchaz/enigma/ExceptionIgnorer.java b/src/main/java/cuchaz/enigma/ExceptionIgnorer.java
deleted file mode 100644
index 84331cc..0000000
--- a/src/main/java/cuchaz/enigma/ExceptionIgnorer.java
+++ /dev/null
@@ -1,35 +0,0 @@
1/*******************************************************************************
2 * Copyright (c) 2015 Jeff Martin.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the GNU Lesser General Public
5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html
7 * <p>
8 * Contributors:
9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/
11
12package cuchaz.enigma;
13
14public class ExceptionIgnorer {
15
16 public static boolean shouldIgnore(Throwable t) {
17
18 // is this that pesky concurrent access bug in the highlight painter system?
19 // (ancient ui code is ancient)
20 if (t instanceof ArrayIndexOutOfBoundsException) {
21 StackTraceElement[] stackTrace = t.getStackTrace();
22 if (stackTrace.length > 1) {
23
24 // does this stack frame match javax.swing.text.DefaultHighlighter.paint*() ?
25 StackTraceElement frame = stackTrace[1];
26 if (frame.getClassName().equals("javax.swing.text.DefaultHighlighter") && frame.getMethodName().startsWith("paint")) {
27 return true;
28 }
29 }
30 }
31
32 return false;
33 }
34
35}