Skip to content

Commit

Permalink
Adding UncheckedIOException to onFailure handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardo-mestre committed Dec 19, 2023
1 parent bfbf15a commit 8c3e8f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.UncheckedIOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.http.HttpClient;
Expand Down Expand Up @@ -127,8 +126,8 @@ public void send(
() -> {
try {
return sendInternal(marshaler);
} catch (IOException | UncheckedIOException e) {
onError.accept(e);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
},
executorService)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public byte[] responseBody() throws IOException {
return body.bytes();
}
});
} catch (UncheckedIOException e) {
} catch (Throwable e) {
onError.accept(e);
}
}
Expand Down

0 comments on commit 8c3e8f7

Please sign in to comment.