Skip to content

Commit a2eeaaa

Browse files
author
Oleg Aleksandrov
committed
Issue-1160 Put whole Error into Exception during Error processing, not just stack trace
1 parent d9537d6 commit a2eeaaa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,12 +1084,12 @@ public void run() {
10841084
ws.close();
10851085
}
10861086
log.error("Got fatal error in worker thread" + getName());
1087-
Exception exception = new Exception(e.getMessage());
1087+
Exception exception = new Exception(e);
10881088
handleFatal(ws, exception);
10891089
} catch (Throwable e) {
10901090
log.error("Uncaught exception in thread {}: {}", getName(), e);
10911091
if (ws != null) {
1092-
Exception exception = new Exception(e.getMessage());
1092+
Exception exception = new Exception(e);
10931093
onWebsocketError(ws, exception);
10941094
ws.close();
10951095
}

0 commit comments

Comments
 (0)