From 23d119e6129feb652a0d2da1ea3bef1c8534b68f Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 12 Dec 2011 10:32:25 -0500 Subject: Add the failure attribute on unknown bind errors, as well as on PluginExecutionErrors --- src/lib/Server/Core.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') 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) -- cgit v1.2.3-1-g7c22