[
https://issues.apache.org/jira/browse/HTTPCORE-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760233#action_12760233
]
Oleg Kalnichevski commented on HTTPCORE-208:
--------------------------------------------
> For (1) and (2) type errors, I think its always better to stop and restart
> the IO reactor.
Agreed.
> than writing a bunch of try-catches in multiple places of user code
(1) What I am trying to say is that I do not think IOReactorExceptionHandler is
the right place. IOReactorExceptionHandler should be used in extreme cases for
handling fatal exceptions. It should really be the last resort. If you want the
protocol layer to be able to handle certain type of exceptions, just catch it
in the IOEventDispatch impl where appropriate and let the protocol code handle
using a callback of some kind while having full access to the IOSession that
caused the exception.
(2) Another problem is that we ought not change IOReactorExceptionHandler
interface unless we want the next release to be 5.0
Oleg
> Pass the IOSession along with the Exception to the registered
> IOReactorExceptionHandler
> ---------------------------------------------------------------------------------------
>
> Key: HTTPCORE-208
> URL: https://issues.apache.org/jira/browse/HTTPCORE-208
> Project: HttpComponents HttpCore
> Issue Type: Improvement
> Affects Versions: 4.1-alpha1
> Reporter: Asankha C. Perera
> Assignee: Asankha C. Perera
> Priority: Minor
> Fix For: 4.1-beta1
>
>
> Currently an IOReactorExceptionHandler is only passed the exception
> encountered by the reactor. The BaseIOReactor which ultimately calls the
> exception handler could pass the IOSession to the exception handler. With
> this, the exception handlers down the line could be enhanced to close the
> session/connection (if its not closed) or use the information for reporting
> purposes etc, such as connection details for the failure.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]