} else if (reply == ErrorHandler.CANCEL) {
// NOTE: Since we have to throw an XmlException for
// the exception to be properly handled, we communicate
// that it is a user cancellation with the special
// string pattern "*** Canceled." in the message.
throw new XmlException("*** Canceled.",
_currentExternalEntity(), _getLineNumber(),
_getColumnNumber());
}
} else {
// No handler. Throw the original exception.
throw ex;
}
}
}
}
// Process delete requests that have accumulated in
// this element.
if (_deleteRequests != null) {
Iterator requests = _deleteRequests.iterator();
while (requests.hasNext()) {
DeleteRequest request = (DeleteRequest) requests.next();
// Be sure to use the handler if these fail so that
// we continue to the next link requests.
try {
request.execute();
} catch (Exception ex) {
if (_handler != null) {
int reply = _handler.handleError(request.toString(),
_current, ex);
if (reply == ErrorHandler.CONTINUE) {
continue;
} else if (reply == ErrorHandler.CANCEL) {
// NOTE: Since we have to throw an XmlException for
// the exception to be properly handled, we communicate
// that it is a user cancellation with the special
// string pattern "*** Canceled." in the message.
throw new XmlException("*** Canceled.",
_currentExternalEntity(), _getLineNumber(),
_getColumnNumber());
}
} else {
// No handler. Throw the original exception.