pingex
/
DiscordBot
Archived
1
0
Fork 0

Super Debug 9000 mode.

master
Pingex aka Raphaël 9 years ago
parent ac4ecbcaf9
commit de2d582fa0

@ -88,6 +88,17 @@ class DiscordBot
* @param args Arguments passed to java * @param args Arguments passed to java
*/ */
public static void main(String[] args) public static void main(String[] args)
{
// SUPER DEBUG 9000
Thread.setDefaultUncaughtExceptionHandler((t, e) -> {
System.out.println("Uncaught thread exception - " + e.getMessage());
e.printStackTrace(System.out);
System.err.println("Uncaught thread exception - " + e.getMessage());
e.printStackTrace(System.err);
});
try
{ {
// SET UP // SET UP
System.setProperty("java.util.logging.SimpleFormatter.format", "%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS [%2$s/%4$s] %5$s%6$s%n"); System.setProperty("java.util.logging.SimpleFormatter.format", "%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS [%2$s/%4$s] %5$s%6$s%n");
@ -119,6 +130,15 @@ class DiscordBot
System.exit(2); System.exit(2);
} }
} }
catch (Throwable e)
{
System.out.println("Uncaught exception - " + e.getMessage());
e.printStackTrace(System.out);
System.err.println("Uncaught exception - " + e.getMessage());
e.printStackTrace(System.err);
}
}
/** /**
* Discord login subroutine. Called by `main()` once * Discord login subroutine. Called by `main()` once