/** * Returns the composite throwable message. * * @return The composite throwable message. */ public String getMessage() { return NestedThrowable.Util.getMessage(super.getMessage(), nested); }
/** * Prints the composite message and the embedded stack trace to the * specified print writer. * * @param writer Writer to print to. */ public void printStackTrace(final PrintWriter writer) { if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) { super.printStackTrace(writer); } NestedThrowable.Util.print(nested, writer); }
/** * Check and possibly warn if the nested exception type is the same * as the parent type (duplicate nesting). */ public static void checkNested(final NestedThrowable parent, final Throwable child) { if (!DETECT_DUPLICATE_NESTING || parent == null || child == null) return; Class<?> parentType = parent.getClass(); Class<?> childType = child.getClass(); // // This might be backwards... I always get this confused // if (parentType.isAssignableFrom(childType)) { // HACK see getLogger() for details Logger log = getLogger(); log.warn("Duplicate throwable nesting of same base type: " + parentType + " is assignable from: " + childType); } }
/** * Prints the composite message and the embedded stack trace to the * specified print writer. * * @param writer Writer to print to. */ public void printStackTrace(final PrintWriter writer) { Exception linked = getLinkedException(); if (linked == null || NestedThrowable.PARENT_TRACE_ENABLED) { super.printStackTrace(writer); } NestedThrowable.Util.print(linked, writer); }
/** * Prints the composite message and the embedded stack trace to the * specified print stream. * * @param stream Stream to print to. */ public void printStackTrace(final PrintStream stream) { Exception linked = getLinkedException(); if (linked == null || NestedThrowable.PARENT_TRACE_ENABLED) { super.printStackTrace(stream); } NestedThrowable.Util.print(linked, stream); }
/** * Prints the composite message and the embedded stack trace to the * specified print stream. * * @param stream Stream to print to. */ public void printStackTrace(final PrintStream stream) { if (detail == null || NestedThrowable.PARENT_TRACE_ENABLED) { super.printStackTrace(stream); } NestedThrowable.Util.print(detail, stream); }
/** * Prints the composite message and the embedded stack trace to the * specified print writer. * * @param writer Writer to print to. */ public void printStackTrace(final PrintWriter writer) { if (detail == null || NestedThrowable.PARENT_TRACE_ENABLED) { super.printStackTrace(writer); } NestedThrowable.Util.print(detail, writer); }
/** * Prints the composite message and the embedded stack trace to the * specified print stream. * * @param stream Stream to print to. */ public void printStackTrace(final PrintStream stream) { if (getCausedByException() == null || NestedThrowable.PARENT_TRACE_ENABLED) { super.printStackTrace(stream); } NestedThrowable.Util.print(getCausedByException(), stream); }
/** * Prints the composite message and the embedded stack trace to the * specified print writer. * * @param writer Writer to print to. */ public void printStackTrace(final PrintWriter writer) { if (getCausedByException() == null || NestedThrowable.PARENT_TRACE_ENABLED) { super.printStackTrace(writer); } NestedThrowable.Util.print(getCausedByException(), writer); }
/** * Prints the composite message and the embedded stack trace to the * specified print writer. * * @param writer Writer to print to. */ public void printStackTrace(final PrintWriter writer) { if (t == null || NestedThrowable.PARENT_TRACE_ENABLED) super.printStackTrace(writer); NestedThrowable.Util.print(t, writer); }
/** * Returns the composite throwable message. * * @return The composite throwable message. */ public String getMessage() { return NestedThrowable.Util.getMessage(super.getMessage(), t); }
/** * Returns the composite throwable message. * * @return The composite throwable message. */ public String getMessage() { return NestedThrowable.Util.getMessage(super.getMessage(), getLinkedException()); }
/** * Prints the composite message and the embedded stack trace to the * specified print stream. * * @param stream Stream to print to. */ public void printStackTrace(final PrintStream stream) { if (t == null || NestedThrowable.PARENT_TRACE_ENABLED) super.printStackTrace(stream); NestedThrowable.Util.print(t, stream); }
/** * Prints the composite message and the embedded stack trace to the * specified print stream. * * @param stream Stream to print to. */ public void printStackTrace(final PrintStream stream) { if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) { super.printStackTrace(stream); } NestedThrowable.Util.print(nested, stream); }
/** * Returns the composite throwable message. * * @return The composite throwable message. */ public String getMessage() { return NestedThrowable.Util.getMessage(super.getMessage(), nested); }
/** * Returns the composite throwable message. * * @return The composite throwable message. */ public String getMessage() { return NestedThrowable.Util.getMessage(super.getMessage(), getCausedByException()); }
/** * Returns the composite throwable message. * * @return The composite throwable message. */ public String getMessage() { return NestedThrowable.Util.getMessage(super.getMessage(), detail); }
/** * Construct a <tt>NestedError</tt> with the specified * detail message and nested <tt>Throwable</tt>. * * @param msg Detail message. * @param nested Nested <tt>Throwable</tt>. */ public NestedError(final String msg, final Throwable nested) { super(msg); this.nested = nested; NestedThrowable.Util.checkNested(this, nested); }
/** * Prints the composite message and the embedded stack trace to the * specified print stream. * * @param stream Stream to print to. */ public void printStackTrace(final PrintStream stream) { if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) { super.printStackTrace(stream); } NestedThrowable.Util.print(nested, stream); }
/** * Prints the composite message and the embedded stack trace to the * specified print stream. * * @param stream Stream to print to. */ public void printStackTrace(final PrintStream stream) { if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) { super.printStackTrace(stream); } NestedThrowable.Util.print(nested, stream); }