| | |
| | | { |
| | | // duplicate entry. |
| | | result = Responses.newResult(ResultCode.ENTRY_ALREADY_EXISTS); |
| | | final ErrorResultException ere = ErrorResultException.wrap(result); |
| | | final ErrorResultException ere = ErrorResultException.newErrorResult(result); |
| | | handler.handleErrorResult(ere); |
| | | // doesn't matter if it was canceled. |
| | | requestsInProgress.remove(context); |
| | |
| | | if (abReq.isCanceled()) |
| | | { |
| | | result = Responses.newResult(ResultCode.CANCELLED); |
| | | final ErrorResultException ere = ErrorResultException.wrap(result); |
| | | final ErrorResultException ere = ErrorResultException.newErrorResult(result); |
| | | handler.handleErrorResult(ere); |
| | | requestsInProgress.remove(context); |
| | | return; |
| | |
| | | } |
| | | catch (SaslException e) |
| | | { |
| | | throw ErrorResultException.wrap(Responses.newResult( |
| | | throw ErrorResultException.newErrorResult(Responses.newResult( |
| | | ResultCode.OPERATIONS_ERROR).setCause(e)); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (SaslException e) |
| | | { |
| | | throw ErrorResultException.wrap(Responses.newResult( |
| | | throw ErrorResultException.newErrorResult(Responses.newResult( |
| | | ResultCode.OPERATIONS_ERROR).setCause(e)); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | resultHandler.handleErrorResult(ErrorResultException.wrap(Responses |
| | | resultHandler.handleErrorResult(ErrorResultException.newErrorResult(Responses |
| | | .newBindResult(ResultCode.OPERATIONS_ERROR).setCause(e) |
| | | .setDiagnosticMessage(e.toString()))); |
| | | } |
| | |
| | | { |
| | | // entry not found. |
| | | result = Responses.newCompareResult(ResultCode.NO_SUCH_ATTRIBUTE); |
| | | final ErrorResultException ere = ErrorResultException.wrap(result); |
| | | final ErrorResultException ere = ErrorResultException.newErrorResult(result); |
| | | resultHandler.handleErrorResult(ere); |
| | | // doesn't matter if it was canceled. |
| | | requestsInProgress.remove(context); |
| | |
| | | if (abReq.isCanceled()) |
| | | { |
| | | final Result r = Responses.newResult(ResultCode.CANCELLED); |
| | | final ErrorResultException ere = ErrorResultException.wrap(r); |
| | | final ErrorResultException ere = ErrorResultException.newErrorResult(r); |
| | | resultHandler.handleErrorResult(ere); |
| | | requestsInProgress.remove(context); |
| | | return; |
| | |
| | | { |
| | | // entry is not found. |
| | | result = Responses.newResult(ResultCode.NO_SUCH_OBJECT); |
| | | final ErrorResultException ere = ErrorResultException.wrap(result); |
| | | final ErrorResultException ere = ErrorResultException.newErrorResult(result); |
| | | handler.handleErrorResult(ere); |
| | | // doesn't matter if it was canceled. |
| | | requestsInProgress.remove(context); |
| | |
| | | if (abReq.isCanceled()) |
| | | { |
| | | result = Responses.newResult(ResultCode.CANCELLED); |
| | | final ErrorResultException ere = ErrorResultException.wrap(result); |
| | | final ErrorResultException ere = ErrorResultException.newErrorResult(result); |
| | | handler.handleErrorResult(ere); |
| | | requestsInProgress.remove(context); |
| | | return; |
| | |
| | | { |
| | | // Entry not found. |
| | | result = Responses.newResult(ResultCode.NO_SUCH_OBJECT); |
| | | final ErrorResultException ere = ErrorResultException.wrap(result); |
| | | final ErrorResultException ere = ErrorResultException.newErrorResult(result); |
| | | resultHandler.handleErrorResult(ere); |
| | | // Should searchResultHandler handle anything? |
| | | |
| | |
| | | if (abReq.isCanceled()) |
| | | { |
| | | result = Responses.newResult(ResultCode.CANCELLED); |
| | | final ErrorResultException ere = ErrorResultException.wrap(result); |
| | | final ErrorResultException ere = ErrorResultException.newErrorResult(result); |
| | | resultHandler.handleErrorResult(ere); |
| | | requestsInProgress.remove(context); |
| | | return; |