Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _emit_handle_potential_error(self, event, error):
if event == 'error':
if error:
raise error
else:
raise PyeeException("Uncaught, unspecified 'error' event.")