code: def to_string(cls, error_code):
          
          if error_code == cls.ERROR_UNKNOWN:
              return 'Unknown error.'
          elif error_code == cls.ERROR_NO_MORE_EVENTS:
              return 'There are no more available watchpoint units.'
          elif error_code == cls.ERROR_NO_MORE_ADDR_COMP:
              return 'No more address comparisons can be set.'
          elif error_code == cls.ERROR_NO_MORE_DATA_COMP:
              return 'No more data comparisons can be set.'
          elif error_code == cls.ERROR_INVALID_ADDR_MASK:
              return 'Invalid flags passed for the address mask.'
          elif error_code == cls.ERROR_INVALID_DATA_MASK:
              return 'Invalid flags passed for the data mask.'
          elif error_code == cls.ERROR_INVALID_ACCESS_MASK:
              return 'Invalid flags passed for the access mask.'
          return super(JLinkDataErrors, cls).to_string(error_code)
docs: Returns the string message for the given error code.
  
          Args:
            cls (JLinkDataErrors): the ``JLinkDataErrors`` class
            error_code (int): error code to convert
  
          Returns:
            An error string corresponding to the error code.
  
          Raises:
            ValueError: if the error code is invalid.