Skip to content

Commit aa43025

Browse files
committed
Fix error reporting
1 parent 2b3e2c5 commit aa43025

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/com/timgroup/statsd/UnixStreamClientChannel.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ private void connect() throws IOException {
206206
} catch (Exception e) {
207207
System.out.println("========== Native UDS implementation failed with outer exception: " + e.getClass().getName() + ": " + e.getMessage());
208208
e.printStackTrace();
209+
210+
Throwable cause = e.getCause();
211+
if (e instanceof java.lang.reflect.InvocationTargetException && cause instanceof IOException) {
212+
throw (IOException) cause;
213+
}
209214
throw new IOException("Failed to create UnixStreamClientChannel for native UDS implementation", e);
210215
}
211216
}

0 commit comments

Comments
 (0)