git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0d1fa8e
)
make sure python exceptions propogate back to the client
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Fri, 21 Sep 2012 20:06:42 +0000
(16:06 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Fri, 21 Sep 2012 20:06:42 +0000
(16:06 -0400)
PLC/API.py
patch
|
blob
|
history
diff --git
a/PLC/API.py
b/PLC/API.py
index
0d312f3
..
113d515
100644
(file)
--- a/
PLC/API.py
+++ b/
PLC/API.py
@@
-213,6
+213,15
@@
class PLCAPI:
elif interface == SOAPpy:
result = faultParameter(NS.ENV_T + ":Server", "Method Failed", method)
result._setDetail("Fault %d: %s" % (fault.faultCode, fault.faultString))
elif interface == SOAPpy:
result = faultParameter(NS.ENV_T + ":Server", "Method Failed", method)
result._setDetail("Fault %d: %s" % (fault.faultCode, fault.faultString))
+ except Exception, fault:
+ end = time.time()
+ logger.log_exc("%s %s %s" % (source, method, end-start))
+ if interface == xmlrpclib:
+ result = PLCFault(500, str(fault))
+ methodresponse = None
+ elif interface == SOAPpy:
+ result = faultParameter(NS.ENV_T + ":Server", "Method Failed", method)
+ result._setDetail("Fault %d: %s" % (500, str(fault)))
# Return result
if interface == xmlrpclib:
# Return result
if interface == xmlrpclib: