diff options
author | gjoranv <gv@yahoo-inc.com> | 2017-04-26 14:01:33 +0200 |
---|---|---|
committer | gjoranv <gv@yahoo-inc.com> | 2017-04-26 14:01:33 +0200 |
commit | 1ed0cc0e21c8871e2075e1ab6720efa633c219fb (patch) | |
tree | 5ad683fd1bb7d97f4dedfcfba434227737dbba88 /container-disc | |
parent | 61ab64616bce378f41f3b947165d1933fb46c1f8 (diff) |
Print stacktrace for exceptions and die upon errors.
Diffstat (limited to 'container-disc')
-rw-r--r-- | container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java | 9 |
1 files changed, 6 insertions, 3 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 9830b226c2b..ae7599add4c 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 @@ -6,13 +6,14 @@ import com.yahoo.concurrent.ThreadFactoryFactory; import com.yahoo.container.di.ComponentDeconstructor; import com.yahoo.container.di.componentgraph.Provider; import com.yahoo.jdisc.SharedResource; -import com.yahoo.yolean.Exceptions; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.logging.Logger; +import static java.util.logging.Level.WARNING; + /** * @author tonyv * @author gv @@ -59,9 +60,11 @@ public class Deconstructor implements ComponentDeconstructor { component.deconstruct(); log.info("Finished deconstructing " + component); } catch (Exception e) { - log.warning("Exception thrown when deconstructing " + component + ": " + e.getClass().getName() - + ": " + Exceptions.toMessageString(e)); + log.log(WARNING, "Exception thrown when deconstructing " + component, e); + } catch (Throwable t) { + com.yahoo.protect.Process.logAndDie("Error when deconstructing " + component, t); } } + } } |