Commit b80fc0c4 authored by Julien Muchembled's avatar Julien Muchembled

Log exception when storage or admin die

This commit is similar to 900d4908.
parent 902c7331
...@@ -97,6 +97,14 @@ class Application(object): ...@@ -97,6 +97,14 @@ class Application(object):
self.pt.log() self.pt.log()
def run(self): def run(self):
try:
self._run()
except:
neo.lib.logging.exception('Pre-mortem data:')
self.log()
raise
def _run(self):
"""Make sure that the status is sane and start a loop.""" """Make sure that the status is sane and start a loop."""
if len(self.name) == 0: if len(self.name) == 0:
raise RuntimeError, 'cluster name must be non-empty' raise RuntimeError, 'cluster name must be non-empty'
......
...@@ -168,7 +168,7 @@ class Application(object): ...@@ -168,7 +168,7 @@ class Application(object):
try: try:
self._run() self._run()
except: except:
neo.lib.logging.info('\nPre-mortem informations:') neo.lib.logging.exception('Pre-mortem data:')
self.log() self.log()
raise raise
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment