Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 27779 invoked from network); 28 Sep 2009 12:39:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Sep 2009 12:39:40 -0000 Received: (qmail 57947 invoked by uid 500); 28 Sep 2009 12:39:40 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 57902 invoked by uid 500); 28 Sep 2009 12:39:40 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 57786 invoked by uid 99); 28 Sep 2009 12:39:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Sep 2009 12:39:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Sep 2009 12:39:37 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 123A4234C004 for ; Mon, 28 Sep 2009 05:39:16 -0700 (PDT) Message-ID: <1860863061.1254141556060.JavaMail.jira@brutus> Date: Mon, 28 Sep 2009 05:39:16 -0700 (PDT) From: "Oleg Kalnichevski (JIRA)" To: dev@hc.apache.org Subject: [jira] Commented: (HTTPCORE-208) Pass the IOSession along with the Exception to the registered IOReactorExceptionHandler In-Reply-To: <1662399550.1254114076016.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org