def LogExceptionCallback(type, value, tb):
 logging.error('unexpected error', exc_info=(type, value, tb))

def LogExceptionCallback ( type , value , tb ) : logging . error ( 'unexpected error' , exc_info = ( type , value , tb ) )
logs and then ignores the exception .