use of org.apache.activemq.artemis.api.core.ActiveMQLargeMessageInterruptedException in project activemq-artemis by apache.
the class LargeMessageControllerImpl method checkException.
/**
* @throws ActiveMQException
*/
private void checkException() throws ActiveMQException {
// once the exception is set, the controller is pretty much useless
if (handledException != null) {
if (handledException instanceof ActiveMQException) {
ActiveMQException nestedException;
// instead to just where it was canceled.
if (handledException instanceof ActiveMQLargeMessageInterruptedException) {
nestedException = new ActiveMQLargeMessageInterruptedException(handledException.getMessage());
} else {
nestedException = new ActiveMQException(((ActiveMQException) handledException).getType(), handledException.getMessage());
}
nestedException.initCause(handledException);
throw nestedException;
} else {
throw new ActiveMQException(ActiveMQExceptionType.LARGE_MESSAGE_ERROR_BODY, "Error on saving LargeMessageBufferImpl", handledException);
}
}
}
Aggregations