]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[711] reraise original exception when failed() fails in component.start()
authorJINMEI Tatuya <jinmei@isc.org>
Mon, 31 Dec 2012 22:23:28 +0000 (14:23 -0800)
committerJINMEI Tatuya <jinmei@isc.org>
Mon, 31 Dec 2012 22:23:28 +0000 (14:23 -0800)
see the code comment for the rationale.

src/lib/python/isc/bind10/component.py

index 1f7006cb570c84d580c5a3cdb159482126cc50be..febeb10337c2cdabb8dd93d4e850b7724a479e30 100644 (file)
@@ -177,8 +177,14 @@ class BaseComponent:
             self._start_internal()
         except Exception as e:
             logger.error(BIND10_COMPONENT_START_EXCEPTION, self.name(), e)
-            self.failed(None)
-            raise
+            try:
+                self.failed(None)
+            finally:
+                # Even failed() can fail if this happens during initial startup
+                # time.  In that case we'd rather propagate the original reason
+                # for the failure than the fact that failed() failed.  So we
+                # always re-raise the original exception.
+                raise e
 
     def stop(self):
         """