code: def check_error(code, context="client"):
      
      if code:
          error = error_text(code, context)
          logger.error(error)
          raise Snap7Exception(error)
docs: check if the error code is set. If so, a Python log message is generated
      and an error is raised.