[cig-commits] r19224 - cs/pythia/trunk/pyre/inventory
brad at geodynamics.org
brad at geodynamics.org
Mon Nov 21 11:42:52 PST 2011
Author: brad
Date: 2011-11-21 11:42:52 -0800 (Mon, 21 Nov 2011)
New Revision: 19224
Modified:
cs/pythia/trunk/pyre/inventory/Configurable.py
Log:
Added component hierarchy to trapping of ValueError and RuntimeError exceptions during configuration.
Modified: cs/pythia/trunk/pyre/inventory/Configurable.py
===================================================================
--- cs/pythia/trunk/pyre/inventory/Configurable.py 2011-11-21 18:41:13 UTC (rev 19223)
+++ cs/pythia/trunk/pyre/inventory/Configurable.py 2011-11-21 19:42:52 UTC (rev 19224)
@@ -68,13 +68,23 @@
def applyConfiguration(self, context=None):
"""transfer user settings to my inventory"""
- if context is None:
- context = self.newConfigContext()
+ try:
- context.configureComponent(self)
+ if context is None:
+ context = self.newConfigContext()
+
+ context.configureComponent(self)
- # give descendants a chance to adjust to configuration changes
- self._configure()
+ # give descendants a chance to adjust to configuration changes
+ self._configure()
+
+
+ except ValueError, err:
+ aliases = ", ".join(self.aliases)
+ raise ValueError("Backtrace - Component %s:\n%s" % (aliases, err.message))
+ except RuntimeError, err:
+ aliases = ", ".join(self.aliases)
+ raise RuntimeError("Backtrace - Component %s:\n%s" % (aliases, err.message))
return context
More information about the CIG-COMMITS
mailing list