Beispiel #1
0
 def handling_exceptions(self):
     """Performs proper exception handling."""
     try:
         with handling_broken_process_pool():
             yield
     except SystemExit as err:
         self.register_error(err.code)
     except BaseException as err:
         if isinstance(err, CoconutException):
             logger.print_exc()
         elif not isinstance(err, KeyboardInterrupt):
             traceback.print_exc()
         self.register_error(errmsg=err.__class__.__name__)
Beispiel #2
0
 def handling_exceptions(self):
     """Performs proper exception handling."""
     try:
         with handling_broken_process_pool():
             yield
     except SystemExit as err:
         self.register_error(err.code)
     except BaseException as err:
         if isinstance(err, CoconutException):
             logger.print_exc()
         elif not isinstance(err, KeyboardInterrupt):
             traceback.print_exc()
         self.register_error(errmsg=err.__class__.__name__)