summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRaul Cuza <raulcuza@gmail.com>2011-12-23 23:03:11 -0800
committerRaul Cuza <raulcuza@gmail.com>2011-12-23 23:03:11 -0800
commit49b1adfa957647a2d39d069f45f6a8110c325d60 (patch)
treee62198fa9017bd74326fee80c4c10db7822ebdc1 /src
parenta46ec1f9679409f9d3934987fd558fc2107b9ec6 (diff)
parent23d119e6129feb652a0d2da1ea3bef1c8534b68f (diff)
downloadbcfg2-49b1adfa957647a2d39d069f45f6a8110c325d60.tar.gz
bcfg2-49b1adfa957647a2d39d069f45f6a8110c325d60.tar.bz2
bcfg2-49b1adfa957647a2d39d069f45f6a8110c325d60.zip
Merge pull request #4 from wgen/error_handling
Mark all errors during binds as failures in the result elements
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Core.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py
index daa439db1..05625cf22 100644
--- a/src/lib/Server/Core.py
+++ b/src/lib/Server/Core.py
@@ -230,12 +230,14 @@ class Core(Component):
continue
try:
self.Bind(entry, metadata)
- except PluginExecutionError:
+ except PluginExecutionError, exc:
if 'failure' not in entry.attrib:
- entry.set('failure', 'bind error')
+ entry.set('failure', 'bind error: %s' % exc)
logger.error("Failed to bind entry: %s %s" % \
(entry.tag, entry.get('name')))
- except:
+ except Exception, exc:
+ if 'failure' not in entry.attrib:
+ entry.set('failure', 'bind error: %s' % exc)
logger.error("Unexpected failure in BindStructure: %s %s" \
% (entry.tag, entry.get('name')), exc_info=1)