Class RecursivelyDescribeExceptionStack
Object
RecursivelyDescribeExceptionStack
Generates a nice string representation of an Exception and its causes according to certain rules.
- Author:
- Owen Feehan
-
Method Summary
-
Method Details
-
apply
public static void apply(Throwable excDescribe, Writer writer, String prefix, int wordWrapLimit, boolean showExceptionType) throws IOException Incrementally adds a line to a string builder with the message of each exception moving onto the next nested exception until there are no more- Parameters:
excDescribe
- exception to describewriter
- where the friendly-messaged is outputtedprefix
- incrementally prepended to each message (first message is skipped)wordWrapLimit
- max-number of characters of a single-line of the screen (considering only prefix + line), if it's -1 it is disabledshowExceptionType
- adds a rightmost column showing the exception class type- Throws:
IOException
- if an I/O error occurs with the writer
-