Skip to content

Commit d6470c6

Browse files
committed
filter Broken pipe errors from stack trace log
1 parent 8fd6f05 commit d6470c6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test-app/app/src/main/java/com/tns/AndroidJsV8Inspector.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,10 @@ protected void onPong(NanoWSD.WebSocketFrame pong) {
335335

336336
@Override
337337
protected void onException(IOException exception) {
338-
exception.printStackTrace();
338+
// when the chrome inspector is disconnected by closing the tab a "Broken pipe" exception is thrown which we don't need to log
339+
if(!exception.getMessage().equals("Broken pipe")) {
340+
exception.printStackTrace();
341+
}
339342
disconnect();
340343
}
341344
}

0 commit comments

Comments
 (0)