code: def exception_handler(self, ex):  # pylint: disable=no-self-use
          
          if isinstance(ex, CLIError):
              logger.error(ex)
          else:
              logger.exception(ex)
          return 1
docs: The default exception handler