summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-11-28 20:18:16 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-11-28 20:18:16 +0000
commite568f5a239618fab5ff36bd95bc052c05ce0ebe3 (patch)
treec7aa2114a97da27503223e5abda578b480d8d998 /src
parente57af5d12a6465ddff3d23443eb4a98d18aaef4c (diff)
downloadbcfg2-e568f5a239618fab5ff36bd95bc052c05ce0ebe3.tar.gz
bcfg2-e568f5a239618fab5ff36bd95bc052c05ce0ebe3.tar.bz2
bcfg2-e568f5a239618fab5ff36bd95bc052c05ce0ebe3.zip
report unexpected errors even if a fault is returned to the client
(Logical change 1.367) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1541 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Component.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/Server/Component.py b/src/lib/Server/Component.py
index d94091a84..57d0e1d89 100644
--- a/src/lib/Server/Component.py
+++ b/src/lib/Server/Component.py
@@ -143,6 +143,12 @@ class Component(SSL.SSLServer,
except Fault, fault:
response = dumps(fault)
except:
+ (trace, val, trb) = exc_info()
+ syslog(LOG_ERR, "Unexpected failure in handler")
+ for line in extract_tb(trb):
+ syslog(LOG_ERR, ' File "%s", line %i, in %s\n %s\n' % line)
+ syslog(LOG_ERR, "%s: %s\n"%(trace, val))
+ del trace, val, trb
# report exception back to server
response = dumps(Fault(1,
"%s:%s" % (sys.exc_type, sys.exc_value)))