def error(self, error_msg):
if self.logger is not None:<EOL><INDENT>self.logger.error(error_msg)<EOL><DEDENT>if self.exc is not None:<EOL><INDENT>raise self.exc(error_msg)<EOL><DEDENT>
Outputs error message on own logger. Also raises exceptions if need be.

Args:
    error_msg: message to output