IDEA-CR-19585 Disposer: process all children even if their disposal throws exceptions: fix review comments

This commit is contained in:
peter
2017-03-22 15:37:35 +01:00
parent 6efcc23361
commit 979bb6a793
3 changed files with 9 additions and 7 deletions
@@ -51,9 +51,9 @@ public class LoggedErrorProcessor {
System.err.println("ERROR: " + message);
if (t != null) t.printStackTrace(System.err);
if (details != null && details.length > 0) {
System.out.println("details: ");
System.err.println("details: ");
for (String detail : details) {
System.out.println(detail);
System.err.println(detail);
}
}
}
@@ -156,14 +156,16 @@ final class ObjectNode<T> {
private static void handleExceptions(List<Throwable> exceptions) {
if (!exceptions.isEmpty()) {
for (Throwable exception : exceptions) {
if (!(exception instanceof ProcessCanceledException)) {
LOG.error(exception);
}
}
ProcessCanceledException pce = ContainerUtil.findInstance(exceptions, ProcessCanceledException.class);
if (pce != null) {
throw pce;
}
for (Throwable exception : exceptions) {
LOG.error(exception);
}
}
}
@@ -354,7 +354,7 @@ public class DisposerTest extends TestCase {
Disposer.dispose(parent);
fail("Should throw");
}
catch (Exception e) {
catch (Throwable e) {
assertEquals("Expected", e.getMessage());
}