Silence Exceptions
This commit is contained in:
parent
1302a9c271
commit
7dd66d675c
2 changed files with 17 additions and 3 deletions
|
@ -33,6 +33,8 @@ public class Configuration
|
||||||
public static boolean pingback = false;
|
public static boolean pingback = false;
|
||||||
public static boolean deleteForeignLibraries = true;
|
public static boolean deleteForeignLibraries = true;
|
||||||
public static boolean canExit = false;
|
public static boolean canExit = false;
|
||||||
|
public static int silenceExceptionGUI = 0;
|
||||||
|
public static int pauseExceptionGUI = 0;
|
||||||
|
|
||||||
public static boolean verifyCorruptedStateOnBoot = false; //eventually may be a setting
|
public static boolean verifyCorruptedStateOnBoot = false; //eventually may be a setting
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,8 @@ import java.io.StringWriter;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JScrollPane;
|
import javax.swing.JScrollPane;
|
||||||
import javax.swing.JTextArea;
|
import javax.swing.JTextArea;
|
||||||
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
|
|
||||||
|
import the.bytecode.club.bytecodeviewer.Configuration;
|
||||||
import the.bytecode.club.bytecodeviewer.Resources;
|
import the.bytecode.club.bytecodeviewer.Resources;
|
||||||
|
|
||||||
import static the.bytecode.club.bytecodeviewer.Constants.*;
|
import static the.bytecode.club.bytecodeviewer.Constants.*;
|
||||||
|
@ -71,8 +72,19 @@ public class ExceptionUI extends JFrame {
|
||||||
setup(e, author);
|
setup(e, author);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setup(Throwable e, String author) {
|
private void setup(Throwable e, String author)
|
||||||
|
{
|
||||||
|
//exceptions are completely hidden
|
||||||
|
if(Configuration.silenceExceptionGUI > 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//exception GUI is disabled but printstack is still enabled
|
||||||
|
if(Configuration.pauseExceptionGUI > 0)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.setIconImages(Resources.iconList);
|
this.setIconImages(Resources.iconList);
|
||||||
setSize(new Dimension(600, 400));
|
setSize(new Dimension(600, 400));
|
||||||
setTitle("Bytecode Viewer " + VERSION + " - Stack Trace - Send this to " + author);
|
setTitle("Bytecode Viewer " + VERSION + " - Stack Trace - Send this to " + author);
|
||||||
|
|
Loading…
Reference in a new issue