You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Norbert Reilly (JIRA)" <ji...@apache.org> on 2006/05/12 06:10:09 UTC

[jira] Updated: (DIRSERVER-619) NamingException messages are thrown away by MessageHandlers

     [ http://issues.apache.org/jira/browse/DIRSERVER-619?page=all ]

Norbert Reilly updated DIRSERVER-619:
-------------------------------------

    Attachment: handler_exception_msgs_at_397393.patch

Patch is from top-level of "trunks"

> NamingException messages are thrown away by MessageHandlers
> -----------------------------------------------------------
>
>          Key: DIRSERVER-619
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-619
>      Project: Directory ApacheDS
>         Type: Bug

>   Components: ldap
>     Versions: 1.0-RC3
>  Environment: N/A
>     Reporter: Norbert Reilly
>  Attachments: handler_exception_msgs_at_397393.patch
>
> The LDAP MessageHandlers (e.g. org.apache.directory.server.ldap.support.AddHandler) throw away the messages attached to caught NamingExceptions before rethrowing their own newly created exceptions:
>         catch ( NamingException e )
>         {
>             String msg = "failed to add entry " + req.getEntry();
>             if ( log.isDebugEnabled() )
>             {
>                 msg += ":\n" + ExceptionUtils.getStackTrace( e );
>             }
> where I would like to see
>         catch ( NamingException e )
>         {
>             String msg = "failed to add entry " + req.getEntry() + ": " + e.getMessage();
> instead. Without this fix all meaningful details about the problem are thrown away and can not be displayed in the LDAP client meaning that server log files have to be inspected immediately.
> In addition, this seems like a simple oversight as even in the debugging case only the server stacktrace is merged into the exception message and hence sent to the client where the original NamingException message is much more valuable for debugging then the stacktrace alone.

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