Better error reporting in codegen tests:
an exception from generateToText() used to mask the one from the original run
This commit is contained in:
@@ -166,7 +166,14 @@ public abstract class CodegenTestCase extends UsefulTestCase {
|
||||
DxChecker.check(classFileFactory);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
System.out.println(generateToText());
|
||||
try {
|
||||
System.out.println(generateToText());
|
||||
}
|
||||
catch (Throwable e1) {
|
||||
System.err.println("Exception thrown while trying to generate text, the actual exception follows:");
|
||||
e1.printStackTrace();
|
||||
System.err.println("-----------------------------------------------------------------------------");
|
||||
}
|
||||
throw ExceptionUtils.rethrow(e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user