@Override public ExceptionService getExceptionService() { return new CachingEmailExceptionServiceImpl( getI18nService(), getApplicationService(), getExceptionViews(), getNoEmailExceptions(), getAuthenticationService(), getSmtpService(), getRecipientEmail(), isDoNotSendExceptionReportsToDevelopers(), getDevelEmail(), cache, getLogLevel()); }
@Override public ExceptionService getExceptionService() { return new SimpleExceptionServiceImpl( getI18nService(), getApplicationService(), exceptionViews, authenticationService, logLevel); }
/** * @param t * @throws ExceptionHandlingException */ private static void safeCatchException( final Throwable t) throws ExceptionHandlingException { ExceptionService exceptionService = createSafeExceptionService(); exceptionService.setParameters(t); exceptionService.handleException(); }
@Override public ExceptionService getExceptionService() { return new EmailExceptionServiceImpl( getI18nService(), getApplicationService(), getExceptionViews(), getNoEmailExceptions(), getAuthenticationService(), smtpService, recipientEmail, doNotSendExceptionReportsToDevelopers, getDevelEmail(), getLogLevel()); }
/** * @return The real cause of an exception. * @param t */ public static Throwable getRealCause(final Throwable t) { Throwable cause = getCause(t); if (cause == null) { return t; } return getRealCause(cause); }
/** * @return A list of strings that correspond to the short stack trace of an exception. * @param t */ public static List<String> getShortStackTraceStrings(final Throwable t) { return internalGetShortStackTraceStrings(t, false); }
/** * @return the exceptionService that was stored in session when the exception was thrown. */ private ExceptionService getExceptionService() { return ExceptionUtils.getMarkedExceptionService(); }
/** * @param noEmailExceptions the noEmailExceptions to set */ public void setNoEmailExceptions(final List<String> noEmailExceptions) { for (String className : noEmailExceptions) { addNoEmailException(className); } }
/** * @return true if the exception has a cause of the given classes, false otherwise. * @param t * @param exceptionClasses */ public static boolean hasCause(final Throwable t, final Class<? extends Throwable>[] exceptionClasses) { for (Class<? extends Throwable> clazz : exceptionClasses) { if (hasCause(t, clazz)) { return true; } } return false; }
/** * @return A list of strings that correspond to the stack trace of an exception. * @param t */ public static List<String> getStackTraceStrings(final Throwable t) { return internalGetStackTraceStrings(t); }
/** * @param exceptionViews the exceptionViews to set */ public void setExceptionViews(final Map<String, String> exceptionViews) { for (String className : exceptionViews.keySet()) { addExceptionView(className, exceptionViews.get(className)); } }
/** * @return an exception service. */ private static ExceptionService getExceptionService() { ExceptionServiceFactory exceptionServiceFactory = (ExceptionServiceFactory) BeanUtils.getBean(EXCEPTION_SERVICE_FACTORY_BEAN); return exceptionServiceFactory.getExceptionService(); }
/** * @return the stack trace of the exception that was thrown. */ public List<String> getExceptionStackTrace() { Throwable t = getThrowable(); if (t == null) { return null; } return ExceptionUtils.getStackTraceStrings(t); }
/** * @return the stack trace of the exception that was thrown. */ public List<String> getExceptionShortStackTrace() { Throwable t = getThrowable(); if (t == null) { return null; } return ExceptionUtils.getShortStackTraceStrings(t); }
/** * @return the browser. */ public String getUserAgent() { if (getExceptionService() == null) { return null; } return getExceptionService().getUserAgent(); }
/** * @return the email the exception report was sent to. */ public String getRecipientEmail() { if (getExceptionService() == null) { return null; } return getExceptionService().getRecipientEmail(); }
/** * @return the request headers. */ public Set<String> getRequestHeaders() { if (getExceptionService() == null) { return null; } return getExceptionService().getRequestHeaders(); }
/** * @return the request parameters. */ public Set<String> getRequestParameters() { if (getExceptionService() == null) { return null; } return getExceptionService().getRequestParameters(); }
/** * @return the version of the application. */ public Version getApplicationVersion() { if (getExceptionService() == null) { return null; } return getExceptionService().getApplicationVersion(); }
/** * @return the id of the current user. */ public String getUserId() { if (getExceptionService() == null) { return null; } return getExceptionService().getUserId(); }