FINRAOS / JTAF-XCore

XCore is a framework to define and execute automated tests. It enables automation code development in Java, test script development in XML via domain specific language, and execution & reporting via JUnit.
http://finraos.github.io/JTAF-XCore/
Apache License 2.0
10 stars 17 forks source link

Blank Fatal Messages #73

Open MADiep opened 8 years ago

MADiep commented 8 years ago

Sometimes a FATAL log event will have no message, leaving the user completely in the dark of the cause of the error. This is caused by the use of the Throwable.getMessage() method. Because a Throwable is not guaranteed to have a message, it simply produces an empty message.

Changing these instances to use toString() will at minimum show the exception type. Alternatively, JTAF can also check if the message is null or empty and fall back to toString().

mmlinford commented 8 years ago

What about using org.apache.log4j.Category.fatal(Object, Throwable) instead and add new messages where necessary? It looks it's meant for exactly this situation.