/** * @deprecated Java 1.4 has introduced {@link #getCause()} - use that instead, especially as this can't return * runtime exceptions and errors as is. */ @Deprecated public Exception getCauseException() { return getCause() instanceof Exception ? (Exception) getCause() : new Exception("Wrapped to Exception: " + getCause(), getCause()); }
private void renderMessages() { String description = getDescription(); if (description != null && description.length() != 0) { messageWithoutStackTop = description; } else if (getCause() != null) { messageWithoutStackTop = "No error description was specified for this error; low-level message: " + getCause().getClass().getName() + ": " + getCause().getMessage(); } else { messageWithoutStackTop = "[No error description was available.]"; } String stackTopFew = getFTLInstructionStackTopFew(); if (stackTopFew != null) { message = messageWithoutStackTop + "\n\n" + _CoreAPI.ERROR_MESSAGE_HR + "\n" + FTL_INSTRUCTION_STACK_TRACE_TITLE + "\n" + stackTopFew + _CoreAPI.ERROR_MESSAGE_HR; messageWithoutStackTop = message.substring(0, messageWithoutStackTop.length()); // to reuse backing char[] } else { message = messageWithoutStackTop; } }
/** * The work around the problematic cases where we should throw a {@link TemplateException}, but we are inside * a {@link TemplateModel} method and so we can only throw {@link TemplateModelException}-s. */ public static TemplateModelException ensureIsTemplateModelException(String modelOpMsg, TemplateException e) { if (e instanceof TemplateModelException) { return (TemplateModelException) e; } else { return new _TemplateModelException( _TemplateAPI.getBlamedExpression(e), e.getCause(), e.getEnvironment(), modelOpMsg); } }
if (getCause() != null) { Throwable causeCause = getCause().getCause(); if (causeCause == null) { try { Method m = getCause().getClass().getMethod("getRootCause", CollectionUtils.EMPTY_CLASS_ARRAY); Throwable rootCause = (Throwable) m.invoke(getCause(), CollectionUtils.EMPTY_OBJECT_ARRAY); if (rootCause != null) { out.println("ServletException root cause: ");
/** * @deprecated Java 1.4 has introduced {@link #getCause()} - use that instead, especially as this can't return * runtime exceptions and errors as is. */ @Deprecated public Exception getCauseException() { return getCause() instanceof Exception ? (Exception) getCause() : new Exception("Wrapped to Exception: " + getCause(), getCause()); }
/** * @deprecated Java 1.4 has introduced {@link #getCause()} - use that instead, especially as this can't return * runtime exceptions and errors as is. */ @Deprecated public Exception getCauseException() { return getCause() instanceof Exception ? (Exception) getCause() : new Exception("Wrapped to Exception: " + getCause(), getCause()); }
private void renderMessages() { String description = getDescription(); if (description != null && description.length() != 0) { messageWithoutStackTop = description; } else if (getCause() != null) { messageWithoutStackTop = "No error description was specified for this error; low-level message: " + getCause().getClass().getName() + ": " + getCause().getMessage(); } else { messageWithoutStackTop = "[No error description was available.]"; } String stackTopFew = getFTLInstructionStackTopFew(); if (stackTopFew != null) { message = messageWithoutStackTop + "\n\n" + _CoreAPI.ERROR_MESSAGE_HR + "\n" + FTL_INSTRUCTION_STACK_TRACE_TITLE + "\n" + stackTopFew + _CoreAPI.ERROR_MESSAGE_HR; messageWithoutStackTop = message.substring(0, messageWithoutStackTop.length()); // to reuse backing char[] } else { message = messageWithoutStackTop; } }
private void renderMessages() { String description = getDescription(); if (description != null && description.length() != 0) { messageWithoutStackTop = description; } else if (getCause() != null) { messageWithoutStackTop = "No error description was specified for this error; low-level message: " + getCause().getClass().getName() + ": " + getCause().getMessage(); } else { messageWithoutStackTop = "[No error description was available.]"; } String stackTopFew = getFTLInstructionStackTopFew(); if (stackTopFew != null) { message = messageWithoutStackTop + "\n\n" + _CoreAPI.ERROR_MESSAGE_HR + "\n" + FTL_INSTRUCTION_STACK_TRACE_TITLE + "\n" + stackTopFew + _CoreAPI.ERROR_MESSAGE_HR; messageWithoutStackTop = message.substring(0, messageWithoutStackTop.length()); // to reuse backing char[] } else { message = messageWithoutStackTop; } }
/** * The work around the problematic cases where we should throw a {@link TemplateException}, but we are inside * a {@link TemplateModel} method and so we can only throw {@link TemplateModelException}-s. */ public static TemplateModelException ensureIsTemplateModelException(String modelOpMsg, TemplateException e) { if (e instanceof TemplateModelException) { return (TemplateModelException) e; } else { return new _TemplateModelException( _TemplateAPI.getBlamedExpression(e), e.getCause(), e.getEnvironment(), modelOpMsg); } }
/** * The work around the problematic cases where we should throw a {@link TemplateException}, but we are inside * a {@link TemplateModel} method and so we can only throw {@link TemplateModelException}-s. */ public static TemplateModelException ensureIsTemplateModelException(String modelOpMsg, TemplateException e) { if (e instanceof TemplateModelException) { return (TemplateModelException) e; } else { return new _TemplateModelException( _TemplateAPI.getBlamedExpression(e), e.getCause(), e.getEnvironment(), modelOpMsg); } }
if (getCause() != null) { Throwable causeCause = getCause().getCause(); if (causeCause == null) { try { Method m = getCause().getClass().getMethod("getRootCause", CollectionUtils.EMPTY_CLASS_ARRAY); Throwable rootCause = (Throwable) m.invoke(getCause(), CollectionUtils.EMPTY_OBJECT_ARRAY); if (rootCause != null) { out.println("ServletException root cause: ");
if (getCause() != null) { Throwable causeCause = getCause().getCause(); if (causeCause == null) { try { Method m = getCause().getClass().getMethod("getRootCause", CollectionUtils.EMPTY_CLASS_ARRAY); Throwable rootCause = (Throwable) m.invoke(getCause(), CollectionUtils.EMPTY_OBJECT_ARRAY); if (rootCause != null) { out.println("ServletException root cause: ");