Skip to content

Commit a3bbb61

Browse files
authored
Print stacktrace for uncaught exception (TooTallNate#437)
1 parent 6f40675 commit a3bbb61

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎src/main/java/org/java_websocket/server/WebSocketServer.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,9 @@ public WebSocketWorker() {
708708
setUncaughtExceptionHandler( new UncaughtExceptionHandler() {
709709
@Override
710710
public void uncaughtException( Thread t, Throwable e ) {
711-
getDefaultUncaughtExceptionHandler().uncaughtException( t, e );
711+
System.err.print("Uncaught exception in thread \""
712+
+ t.getName() + "\":");
713+
e.printStackTrace(System.err);
712714
}
713715
} );
714716
}

0 commit comments

Comments
 (0)