mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-19585 Disposer: process all children even if their disposal throws exceptions: fix review comments
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user