Skip to content

Commit

Permalink
Lost some exception handling code during last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
maartendamen committed Sep 9, 2011
1 parent 6e68ca6 commit 42ac6a9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion examples/common/ozwWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,22 @@ def _getControllerDescription(self):
if node and node._product:
return node._product.name
return 'Unknown Controller'

def zwcallback(self, args):
try:
return self._zwcallback(args)
except:
import sys, traceback
print '\n'.join(traceback.format_exception(*sys.exc_info()))
raise

def _zwcallback(self, args):
'''
Callback Handler
@param args: callback dict
'''

notifyType = args['notificationType']
self._log.debug('\n%s\n%s (node %s)\n%s', '-' * 30, notifyType, args['nodeId'], '-' * 30)
if notifyType == 'DriverReady':
Expand Down

0 comments on commit 42ac6a9

Please sign in to comment.