You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Walter Tam (JIRA)" <ji...@apache.org> on 2005/12/09 02:41:08 UTC

[jira] Created: (DIRMINA-143) SocketAcceptor.bind() should fillInStackTrace() before rethrowing exception

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


[jira] Updated: (DIRMINA-143) SocketAcceptor.bind() should fillInStackTrace() before rethrowing exception

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRMINA-143?page=all ]

Trustin Lee updated DIRMINA-143:
--------------------------------

    Fix Version: 0.9.1

We will fix it in MINA 0.9.1.

> 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
>      Fix For: 0.9.1

>
> 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


[jira] Commented: (DIRMINA-143) SocketAcceptor.bind() should fillInStackTrace() before rethrowing exception

Posted by "Niklas Therning (JIRA)" <ji...@apache.org>.
    [ 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


[jira] Commented: (DIRMINA-143) SocketAcceptor.bind() should fillInStackTrace() before rethrowing exception

Posted by "Walter Tam (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-143?page=comments#action_12359910 ] 

Walter Tam commented on DIRMINA-143:
------------------------------------

Wrapping would be the logical choice. However in this case the IOException being thrown does not support wrapping. A possible solution is to throw a subclass of IOException with a constructor that takes a Throwable arguemnt.

> 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


[jira] Commented: (DIRMINA-143) SocketAcceptor.bind() should fillInStackTrace() before rethrowing exception

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-143?page=comments#action_12360026 ] 

Trustin Lee commented on DIRMINA-143:
-------------------------------------

I think it's not that messy.  Good idea.  What about creating our own exceptions which extends IOException and wrap throws exceptions?

> 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


[jira] Resolved: (DIRMINA-143) SocketAcceptor.bind() should fillInStackTrace() before rethrowing exception

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRMINA-143?page=all ]
     
Trustin Lee resolved DIRMINA-143:
---------------------------------

    Resolution: Fixed

I checked in the fix.

> 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
>      Fix For: 0.9.1

>
> 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