public void shutdown(Throwable e)
{
doShutdown();
unregisterShutdownHook();
Message msg = CoreMessages.fatalErrorWhileRunning();
MuleException muleException = ExceptionHelper.getRootMuleException(e);
int exitCode = 1;
if (muleException != null)
{
logger.fatal(muleException.getDetailedMessage());
exitCode = muleException.getExceptionCode();
}
else
{
logger.fatal(msg.toString() + " " + e.getMessage(), e);
}
List<String> msgs = new ArrayList<String>();
msgs.add(msg.getMessage());
Throwable root = ExceptionHelper.getRootException(e);
msgs.add(root.getMessage() + " (" + root.getClass().getName() + ")");
msgs.add(" ");
msgs.add(CoreMessages.fatalErrorInShutdown().getMessage());
String shutdownMessage = StringMessageUtils.getBoilerPlate(msgs, '*', 80);