Skip to content

Commit e8ef74a

Browse files
authored
Merge pull request #2 from Serpion-ua/Issue-1160
Issue-1160 Put whole Error into Exception during Error processing, not just stack trace
2 parents 7700b91 + a2eeaaa commit e8ef74a

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)