def rewrite_exception(data):
 exc_data = data.get('sentry.interfaces.Exception')
 if (not exc_data):
  return False
 rv = False
 for exc in exc_data['values']:
  for processor in six.itervalues(error_processors):
   try:
    if processor.try_process(exc):
     rv = True
     break
   except Exception as e:
    logger.error('Failed to run processor "%s": %s', processor.vendor, e, exc_info=True)
 return rv

def rewrite_exception ( data ) : exc_data = data . get ( 'sentry.interfaces.Exception' ) if ( not exc_data ) : return False rv = False for exc in exc_data [ 'values' ] : for processor in six . itervalues ( error_processors ) : try : if processor . try_process ( exc ) : rv = True break except Exception as e : logger . error ( 'Failed to run processor "%s": %s' , processor . vendor , e , exc_info = True ) return rv
rewrite an exception in an event if needed .