{
response = new NullResponseMessage();
}
else
{
response = new HornetQExceptionMessage(HornetQMessageBundle.BUNDLE.duplicateMetadata(message.getKey(), message.getData()));
}
break;
}
}
}
catch (HornetQXAException e)
{
if (requiresResponse)
{
HornetQServerLogger.LOGGER.debug("Sending exception to client", e);
response = new SessionXAResponseMessage(true, e.errorCode, e.getMessage());
}
else
{
HornetQServerLogger.LOGGER.caughtXaException(e);
}
}
catch (HornetQException e)
{
if (requiresResponse)
{
HornetQServerLogger.LOGGER.debug("Sending exception to client", e);
response = new HornetQExceptionMessage(e);
}
else
{
HornetQServerLogger.LOGGER.caughtException(e);
}
}
catch (Throwable t)
{
if (requiresResponse)
{
HornetQServerLogger.LOGGER.warn("Sending unexpected exception to the client", t);
HornetQException hqe = new HornetQInternalErrorException();
hqe.initCause(t);
response = new HornetQExceptionMessage(hqe);
}
else
{
HornetQServerLogger.LOGGER.caughtException(t);
}