code: def _catch_exceptions(self, exctype, value, tb):
          
  
          # Now we log it.
          self.error('Uncaught exception', exc_info=(exctype, value, tb))
  
          # First, we print to stdout with some colouring.
          print_exception_formatted(exctype, value, tb)
docs: Catches all exceptions and logs them.