parameters: (main)
docstring: Handle uncaught exception from the main callable.
  
      The function runs the callable passed as main (it is called
      without any provided parameters). If it raises any exception,
      the exception is logged and the application is terminated.
docstring_summary: Handle uncaught exception from the main callable.
docstring_tokens: Handle uncaught exception from the main callable .
function: def traceback_handler(main):
      """
      Handle uncaught exception from the main callable.
  
      The function runs the callable passed as main (it is called
      without any provided parameters). If it raises any exception,
      the exception is logged and the application is terminated.
      """
      try:
          return main()
      except Exception as e:
          fd, name = tempfile.mkstemp(text=True)
          with os.fdopen(fd, 'w') as handle:
              traceback.print_exc(None, handle)
          logger.fatal(PYTHON_UNHANDLED_EXCEPTION, type(e).__name__, e, name)
          sys.exit(1)
function_tokens: def traceback_handler ( main ) : try : return main ( ) except Exception as e : fd , name = tempfile . mkstemp ( text = True ) with os . fdopen ( fd , 'w' ) as handle : traceback . print_exc ( None , handle ) logger . fatal ( PYTHON_UNHANDLED_EXCEPTION , type ( e ) . __name__ , e , name ) sys . exit ( 1 )