@Override public void handleException() throws ExceptionHandlingException { logger.error(throwable); throw new ExceptionHandlingException(throwable); }
/** * @return a safe exception service. */ private static ExceptionService createSafeExceptionService() { try { return new SafeExceptionServiceImpl(); } catch (Throwable t) { LOGGER.error("An exception was thhrown while getting a safe implementation, giving up", t); throw new ExceptionHandlingException(t); } }
@Override public void handleException() throws ExceptionHandlingException { // try to log the throwable try { logTextReport(getThrowable(), getTextReport()); } catch (Throwable t) { logger.error("The following error was thrown by the application:", throwable); logger.error("Another throwable was thrown while logging the first one (giving up):", t); throw new ExceptionHandlingException(t); } }
logger.error("The following error was thrown by the application:", getThrowable()); logger.error("Another exception was thrown while logging the first one (giving up):", e); throw new ExceptionHandlingException(e); logger.error("The following error was thrown by the application:", getThrowable()); logger.error("another exception was thrown while sending an email alert (giving up):", e); throw new ExceptionHandlingException(e);
logger.error("The following error was thrown by the application:", t); logger.error("Another throwable was thrown while logging the first one (giving up):", t2); throw new ExceptionHandlingException(t2);