Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 65244 invoked from network); 9 Dec 2005 07:25:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Dec 2005 07:25:35 -0000 Received: (qmail 41101 invoked by uid 500); 9 Dec 2005 07:25:33 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 41006 invoked by uid 500); 9 Dec 2005 07:25:32 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 40995 invoked by uid 99); 9 Dec 2005 07:25:32 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2005 23:25:30 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 5434818B for ; Fri, 9 Dec 2005 08:25:09 +0100 (CET) Message-ID: <1044450699.1134113109342.JavaMail.jira@ajax.apache.org> Date: Fri, 9 Dec 2005 08:25:09 +0100 (CET) From: "Niklas Therning (JIRA)" To: dev@directory.apache.org Subject: [jira] Commented: (DIRMINA-143) SocketAcceptor.bind() should fillInStackTrace() before rethrowing exception In-Reply-To: <271115179.1134092468308.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DIRMINA-143?page=comments#action_12359862 ] Niklas Therning commented on DIRMINA-143: ----------------------------------------- How about wrapping the original exception in a new IOException instead of using fillInStackTrace()? The message of the new exception would then indicate the port which couldn't be bound to. Or will that be too messy? There might be a philosophy behind using fillInStackTrace() instead of wrapping? I usually prefer wrapping since then I won't miss out on any info that could be useful. Sometimes it can become very messy. In this case, however, I think it will be ok. > SocketAcceptor.bind() should fillInStackTrace() before rethrowing exception > --------------------------------------------------------------------------- > > Key: DIRMINA-143 > URL: http://issues.apache.org/jira/browse/DIRMINA-143 > Project: Directory MINA > Type: Bug > Versions: 0.8.1 > Reporter: Walter Tam > Priority: Minor > > When SocketAcceptor.bind() encounters an exception returned from the bind request, it simply rethrows. The resulting stack trace is from the underlying registration thread which is not very helpful when debugging the cause. Other similar places like SocketAcceptor.unbind(), DatagramAcceptor.unbind() does a fillInStackTrace() before re throwing. > Also it will be helpful in this case to add the port number that failed to the message -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira