helidon
helidon copied to clipboard
4.x: UncheckedIOException no longer a special case
Resolves #9192
No longer using UncheckedIOException as a special case for the server. Server I/O failures now throw a ServerConnectionException, and that extends the CloseConnectionException (which already has its special handling).
This change allows user to handle UncheckIOException as if it is any other throwable.
As part of this change:
- all reads on server (from server request reader) are now wrapped and no longer throw
UncheckedIOException - all writes on server (to server response writer) are surrounded by try/catch blocks to handle this exception.
This is a small behavior change. The original behavior was not documented, and the result was not ideal (as we would close connection even if the UncheckedIOException came from client call to another service).
The new behavior only closes connection with specific exception.