out.println(INFO_PROCESSING_OPERATION.get(
"DELETE", String.valueOf(asn1OctetStr)));
if(!deleteOptions.showOperations())
{
LDAPMessage message = new LDAPMessage(nextMessageID.getAndIncrement(),
protocolOp, controls);
LDAPMessage responseMessage = null;
try
{
connection.getLDAPWriter().writeMessage(message);
responseMessage = connection.getLDAPReader().readMessage();
} catch(ASN1Exception ae)
{
if (debugEnabled())
{
TRACER.debugCaught(DebugLogLevel.ERROR, ae);
}
if (!deleteOptions.continueOnError())
{
String msg = LDAPToolUtils.getMessageForConnectionException(ae);
throw new IOException(msg, ae);
}
else
{
Message msg = INFO_OPERATION_FAILED.get("DELETE");
err.println(wrapText(msg, MAX_LINE_WIDTH));
err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
return;
}
}
DeleteResponseProtocolOp op =
responseMessage.getDeleteResponseProtocolOp();
int resultCode = op.getResultCode();
Message errorMessage = op.getErrorMessage();
if(resultCode != SUCCESS && resultCode != REFERRAL &&
!deleteOptions.continueOnError())
{