testng: extract data from junit exceptions if applicable (IDEA-195047)

This commit is contained in:
Anna.Kozlova
2018-07-05 14:50:23 +02:00
parent 8d9c9ebf0a
commit 3c1f39d056
@@ -225,11 +225,20 @@ public class IDEATestNGRemoteListener {
if (ex != null) {
ComparisonFailureData notification;
try {
notification = TestNGExpectedPatterns.createExceptionNotification(failureMessage);
notification = ComparisonFailureData.create(ex);
}
catch (Throwable e) {
notification = null;
}
if (notification == null) {
try {
notification = TestNGExpectedPatterns.createExceptionNotification(failureMessage);
}
catch (Throwable e) {
notification = null;
}
}
ComparisonFailureData.registerSMAttributes(notification, getTrace(ex), failureMessage, attrs, ex);
}
else {