You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2020. It is now read-only.
Printing the stacktrace of a wrapped AggregateException does not include the inner exceptions:
Exceptione1 = newRuntimeException("Failure 1");
Exceptione2 = newRuntimeException("Failure 2");
Exceptionaggregate = newAggregateException(Arrays.asList(e1, e2));
aggregate.printStackTrace();
// bolts.AggregateException: There were multiple errors.// at bolts.TaskTest.testThing(TaskTest.java:1160)// at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)// at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)// at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)// at java.lang.reflect.Method.invoke(Method.java:606)// at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)// at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)// at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)// at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)// at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)// at org.junit.rules.RunRules.evaluate(RunRules.java:20)// at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)// at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)// at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)// at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)// at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)// at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)// at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)// at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)// at org.junit.runners.ParentRunner.run(ParentRunner.java:363)// at org.junit.runner.JUnitCore.run(JUnitCore.java:137)// at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)// at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)// at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)// at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)// at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)// at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)// at java.lang.reflect.Method.invoke(Method.java:606)// at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)// Caused by: java.lang.RuntimeException: Failure 1// at bolts.TaskTest.testThing(TaskTest.java:1157)// ... 28 more// // Inner throwable #0: java.lang.RuntimeException: Failure 1// at bolts.TaskTest.testThing(TaskTest.java:1157)// at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)// at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)// at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)// at java.lang.reflect.Method.invoke(Method.java:606)// at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)// at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)// at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)// at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)// at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)// at org.junit.rules.RunRules.evaluate(RunRules.java:20)// at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)// at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)// at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)// at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)// at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)// at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)// at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)// at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)// at org.junit.runners.ParentRunner.run(ParentRunner.java:363)// at org.junit.runner.JUnitCore.run(JUnitCore.java:137)// at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)// at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)// at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)// at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)// at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)// at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)// at java.lang.reflect.Method.invoke(Method.java:606)// at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)// // // Inner throwable #1: java.lang.RuntimeException: Failure 2// at bolts.TaskTest.testThing(TaskTest.java:1158)// at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)// at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)// at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)// at java.lang.reflect.Method.invoke(Method.java:606)// at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)// at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)// at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)// at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)// at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)// at org.junit.rules.RunRules.evaluate(RunRules.java:20)// at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)// at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)// at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)// at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)// at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)// at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)// at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)// at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)// at org.junit.runners.ParentRunner.run(ParentRunner.java:363)// at org.junit.runner.JUnitCore.run(JUnitCore.java:137)// at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)// at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)// at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)// at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)// at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)// at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)// at java.lang.reflect.Method.invoke(Method.java:606)// at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)newException(aggregate).printStackTrace();
// java.lang.Exception: bolts.AggregateException: There were multiple errors.// at bolts.TaskTest.testThing(TaskTest.java:1164)// at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)// at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)// at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)// at java.lang.reflect.Method.invoke(Method.java:606)// at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)// at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)// at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)// at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)// at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)// at org.junit.rules.RunRules.evaluate(RunRules.java:20)// at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)// at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)// at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)// at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)// at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)// at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)// at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)// at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)// at org.junit.runners.ParentRunner.run(ParentRunner.java:363)// at org.junit.runner.JUnitCore.run(JUnitCore.java:137)// at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)// at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)// at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)// at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)// at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)// at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)// at java.lang.reflect.Method.invoke(Method.java:606)// at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)// Caused by: bolts.AggregateException: There were multiple errors.// at bolts.TaskTest.testThing(TaskTest.java:1160)// ... 28 more// Caused by: java.lang.RuntimeException: Failure 1// at bolts.TaskTest.testThing(TaskTest.java:1157)// ... 28 more
It seems like the proper way to handle this would be to utilize Throwable#addSuppressed(throwable) instead, but this requires android-19 :(
The text was updated successfully, but these errors were encountered:
Printing the stacktrace of a wrapped
AggregateException
does not include the inner exceptions:It seems like the proper way to handle this would be to utilize
Throwable#addSuppressed(throwable)
instead, but this requires android-19 :(The text was updated successfully, but these errors were encountered: