From: Marco Zanon Date: Wed, 24 Jul 2019 22:01:24 +0000 (+0000) Subject: Modified method to handle Errors too. X-Git-Tag: 7.0.0~5 X-Git-Url: https://gitweb.marcozanon.com/?a=commitdiff_plain;h=63639a7d645bba2061b433dc10ec385957bbb4d4;p=Macaco Modified method to handle Errors too. --- diff --git a/src/java/com/marcozanon/macaco/MInformation.java b/src/java/com/marcozanon/macaco/MInformation.java index a497495..c5f4ad2 100644 --- a/src/java/com/marcozanon/macaco/MInformation.java +++ b/src/java/com/marcozanon/macaco/MInformation.java @@ -30,16 +30,16 @@ public class MInformation extends MObject { 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(); //