Outputs error message on own logger. Also raises exceptions if need be.

        Args:
            error_msg: message to output

def error(self, error_msg):
        """
        Outputs error message on own logger. Also raises exceptions if need be.

        Args:
            error_msg: message to output

        """
        if self.logger is not None:
            self.logger.error(error_msg)

        if self.exc is not None:
            raise self.exc(error_msg)