diff options
| author | 2016-06-30 00:49:21 +1000 | |
|---|---|---|
| committer | 2016-06-30 00:49:21 +1000 | |
| commit | 4be005617b3b8c3578cca07c5d085d12916f0d1d (patch) | |
| tree | db163431f38703e26da417ef05eaea2b27a498b9 /src/cuchaz/enigma/ExceptionIgnorer.java | |
| parent | Some small changes to fix idea importing (diff) | |
| download | enigma-fork-4be005617b3b8c3578cca07c5d085d12916f0d1d.tar.gz enigma-fork-4be005617b3b8c3578cca07c5d085d12916f0d1d.tar.xz enigma-fork-4be005617b3b8c3578cca07c5d085d12916f0d1d.zip | |
Json format (#2)
* Added new format
* Fixed bug
* Updated Version
Diffstat (limited to 'src/cuchaz/enigma/ExceptionIgnorer.java')
| -rw-r--r-- | src/cuchaz/enigma/ExceptionIgnorer.java | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/cuchaz/enigma/ExceptionIgnorer.java b/src/cuchaz/enigma/ExceptionIgnorer.java deleted file mode 100644 index d8726d1..0000000 --- a/src/cuchaz/enigma/ExceptionIgnorer.java +++ /dev/null | |||
| @@ -1,34 +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 | * | ||
| 8 | * Contributors: | ||
| 9 | * Jeff Martin - initial API and implementation | ||
| 10 | ******************************************************************************/ | ||
| 11 | package cuchaz.enigma; | ||
| 12 | |||
| 13 | public class ExceptionIgnorer { | ||
| 14 | |||
| 15 | public static boolean shouldIgnore(Throwable t) { | ||
| 16 | |||
| 17 | // is this that pesky concurrent access bug in the highlight painter system? | ||
| 18 | // (ancient ui code is ancient) | ||
| 19 | if (t instanceof ArrayIndexOutOfBoundsException) { | ||
| 20 | StackTraceElement[] stackTrace = t.getStackTrace(); | ||
| 21 | if (stackTrace.length > 1) { | ||
| 22 | |||
| 23 | // does this stack frame match javax.swing.text.DefaultHighlighter.paint*() ? | ||
| 24 | StackTraceElement frame = stackTrace[1]; | ||
| 25 | if (frame.getClassName().equals("javax.swing.text.DefaultHighlighter") && frame.getMethodName().startsWith("paint")) { | ||
| 26 | return true; | ||
| 27 | } | ||
| 28 | } | ||
| 29 | } | ||
| 30 | |||
| 31 | return false; | ||
| 32 | } | ||
| 33 | |||
| 34 | } | ||