Permalink
Browse files

logging of unexpected exceptions

  • Loading branch information...
1 parent 5a79217 commit d58a5bab80243974c86c2f709b88632bebdad457 @baverman committed Mar 28, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 dropthesoap/service.py
@@ -1,4 +1,6 @@
import traceback
+import logging
+logger = logging.getLogger('dropthesoap.request')
from .schema import xs, wsdl, soap
from .schema.model import Namespace, get_root, etree, Instance, TypeInstance
@@ -193,6 +195,8 @@ def call(self, transport_request, xml):
faultcode = 'Server'
if isinstance(e, Fault):
faultcode = e.code
+ else:
+ logger.exception('Exception during soap request:')
response = soap.Fault.instance(faultcode=faultcode, faultstring=str(e),
detail=traceback.format_exc())

0 comments on commit d58a5ba

Please sign in to comment.