Tests: never use System.err
Always print stack traces to System.out, and replace all
System.err.println()'s with System.out.println().
Follow-up of https://android-review.googlesource.com/#/c/187020/ and
https://android-review.googlesource.com/#/c/407032/.
Test: m test-art-host
m test-art-target
Change-Id: I9ab9cd955a8db25b2ec6673790e5bc924f62c88a
diff --git a/test/008-exceptions/src/Main.java b/test/008-exceptions/src/Main.java
index 74af00c..89fe016 100644
--- a/test/008-exceptions/src/Main.java
+++ b/test/008-exceptions/src/Main.java
@@ -155,7 +155,7 @@
} catch (BadError e) {
System.out.println(e);
} catch (Throwable t) {
- t.printStackTrace();
+ t.printStackTrace(System.out);
}
try {
// Before splitting mirror::Class::kStatusError into
@@ -171,11 +171,11 @@
throw new IllegalStateException("Should not reach here.");
} catch (NoClassDefFoundError ncdfe) {
if (!(ncdfe.getCause() instanceof BadError)) {
- ncdfe.getCause().printStackTrace();
+ ncdfe.getCause().printStackTrace(System.out);
}
} catch (VerifyError e) {
} catch (Throwable t) {
- t.printStackTrace();
+ t.printStackTrace(System.out);
}
}
@@ -186,7 +186,7 @@
} catch (Error e) {
System.out.println(e);
} catch (Throwable t) {
- t.printStackTrace();
+ t.printStackTrace(System.out);
}
// Before splitting mirror::Class::kStatusError into
// kStatusErrorUnresolved and kStatusErrorResolved,
@@ -200,7 +200,7 @@
System.out.println(ncdfe);
System.out.println(" cause: " + ncdfe.getCause());
} catch (Throwable t) {
- t.printStackTrace();
+ t.printStackTrace(System.out);
}
try {
MultiDexBadInitWrapper2.setDummy(1);
@@ -209,7 +209,7 @@
System.out.println(ncdfe);
System.out.println(" cause: " + ncdfe.getCause());
} catch (Throwable t) {
- t.printStackTrace();
+ t.printStackTrace(System.out);
}
}
}