summaryrefslogtreecommitdiffstats
path: root/container-disc
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-04-26 16:01:58 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-04-26 16:01:58 +0200
commite46c4fca4d75631a7412d637a06485c71f8b8c44 (patch)
tree148d54581fd79ac4683b9969b8e88541e65fd784 /container-disc
parent22b8fcb6e22fb9c1061f6fe622300ac00e0715b5 (diff)
Differentiate between Exception, Error and Throwable.
Diffstat (limited to 'container-disc')
-rw-r--r--container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java b/container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java
index 90e4860bd7c..1fd08e2be7b 100644
--- a/container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java
+++ b/container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java
@@ -60,15 +60,16 @@ public class Deconstructor implements ComponentDeconstructor {
try {
component.deconstruct();
log.info("Finished deconstructing " + component);
- } catch (Exception e) {
- log.log(WARNING, "Exception thrown when deconstructing " + component, e);
- } catch (Throwable t) {
+ } catch (Error e) {
try {
Thread.sleep((long) (new Random(System.nanoTime()).nextDouble() * 180 * 1000));
} catch (InterruptedException e) { }
- com.yahoo.protect.Process.logAndDie("Error when deconstructing " + component, t);
+ com.yahoo.protect.Process.logAndDie("Error when deconstructing " + component, e);
+ } catch (Exception e) {
+ log.log(WARNING, "Exception thrown when deconstructing " + component, e);
+ } catch (Throwable t) {
+ log.log(WARNING, "Unexpected Throwable thrown when deconstructing " + component, t);
}
}
-
}
}