Skip to content

Commit

Permalink
logging of unexpected exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
baverman committed Mar 28, 2012
1 parent 5a79217 commit d58a5ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dropthesoap/service.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit d58a5ba

Please sign in to comment.