Log an error and raise an exception.

        Args:
            msg: Error message to log.

        Raises:
            RuntimeError: With the message.

def log_error(self, msg):
        """
        Log an error and raise an exception.

        Args:
            msg: Error message to log.

        Raises:
            RuntimeError: With the message.
        """
        if self.__logger:
            self.__logger.error(msg)

        raise RuntimeError(msg)