return s.toString();
}
- /* Exceptions. */
+ /* Throwables. */
- public static String getExceptionAsString(Exception exception) {
- if (null == exception) {
- throw new IllegalArgumentException("Invalid 'exception': null.");
+ public static String getThrowableAsString(Throwable throwable) {
+ if (null == throwable) {
+ throw new IllegalArgumentException("Invalid 'throwable': null.");
}
//
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
- exception.printStackTrace(pw);
+ throwable.printStackTrace(pw);
pw.flush();
sw.flush();
//