else { resp.getLdapResult().setMatchedDn( "" ); }
    SearchResponseDone getResponse( SearchRequest req, NamingException e )    {        String msg = "failed on search operation:\n" + req + "\n";        msg += ExceptionUtils.getStackTrace( e );        SearchResponseDone resp = new SearchResponseDoneImpl( req.getMessageId() );        ResultCodeEnum rc = ResultCodeEnum.getBestEstimate( e, req.getType() );        resp.setLdapResult( new LdapResultImpl( resp ) );        resp.getLdapResult().setResultCode( rc );        resp.getLdapResult().setErrorMessage( msg );        if ( e.getResolvedName() != null )        {            resp.getLdapResult().setMatchedDn( e.getResolvedName().toString() );        }        return resp;    }