Skip to content

Commit f456072

Browse files
committed
Don't catch unrecoverable errors in the main loop
Throwable includes Error subtypes, which are not expected to be caught: out of memory errors or thread stop. We don't have a reason to catch them, so don't.
1 parent f98c8eb commit f456072

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • dogstatsd-http-forwarder/src/main/java/com/datadoghq/dogstatsd/http/forwarder

dogstatsd-http-forwarder/src/main/java/com/datadoghq/dogstatsd/http/forwarder/Forwarder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public void run() {
7575
runOnce(queue.next());
7676
} catch (InterruptedException e) {
7777
return;
78-
} catch (Throwable t) {
78+
} catch (Exception t) {
7979
logger.log(Level.SEVERE, "unexpected error in forwarder loop", t);
8080
}
8181
}

0 commit comments

Comments
 (0)