Generate instructions as text in case of other exceptions
It makes possible to analyze what causes a failure if DxChecker.check fails
This commit is contained in:
@@ -521,6 +521,24 @@ public abstract class CodegenTestCase extends KtUsefulTestCase {
|
||||
catch (TestsCompiletimeError e) {
|
||||
if (reportProblems) {
|
||||
e.getOriginal().printStackTrace();
|
||||
generateInstructionsAsText();
|
||||
System.err.println("See exceptions above");
|
||||
}
|
||||
else {
|
||||
System.err.println("Compilation failure");
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
catch (Throwable e) {
|
||||
if (reportProblems) {
|
||||
generateInstructionsAsText();
|
||||
}
|
||||
throw new TestsCompilerError(e);
|
||||
}
|
||||
return classFileFactory;
|
||||
}
|
||||
|
||||
private void generateInstructionsAsText() {
|
||||
System.err.println("Generating instructions as text...");
|
||||
try {
|
||||
if (classFileFactory == null) {
|
||||
@@ -535,17 +553,6 @@ public abstract class CodegenTestCase extends KtUsefulTestCase {
|
||||
e1.printStackTrace();
|
||||
System.err.println("-----------------------------------------------------------------------------");
|
||||
}
|
||||
System.err.println("See exceptions above");
|
||||
}
|
||||
else {
|
||||
System.err.println("Compilation failure");
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
catch (Throwable e) {
|
||||
throw new TestsCompilerError(e);
|
||||
}
|
||||
return classFileFactory;
|
||||
}
|
||||
|
||||
protected boolean verifyWithDex() {
|
||||
|
||||
Reference in New Issue
Block a user