The default exception handler

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