def log_error(self, msg):
if self.__logger:<EOL><INDENT>self.__logger.error(msg)<EOL><DEDENT>raise RuntimeError(msg)<EOL>
Log an error and raise an exception.

Args:
    msg: Error message to log.

Raises:
    RuntimeError: With the message.