code: public function setProperty($strPropertyName, $varValue)
      {
          if ($this->getItem()) {
              $varInternalValue = $varValue;
              // Test if it is an attribute, if so, let it transform the data for the widget.
              $objAttribute = $this->getItem()->getAttribute($strPropertyName);
              if ($objAttribute) {
                  $varInternalValue = $objAttribute->widgetToValue($varValue, $this->getItem()->get('id'));
              }
              if ($varValue !== $this->getProperty($strPropertyName)) {
                  $this->setMeta(static::IS_CHANGED, true);
                  $this->getItem()->set($strPropertyName, $varInternalValue);
                  try {
                      DifferentValuesException::compare($varValue, $this->getProperty($strPropertyName), false);
                  } catch (DifferentValuesException $exception) {
                      throw new DcGeneralInvalidPropertyValueException(
                          sprintf(
                              'Property %s (%s) did not accept the value (%s).',
                              $strPropertyName,
                              $objAttribute->get('type'),
                              $exception->getLongMessage()
                          ),
                          1,
                          $exception
                      );
                  }
              }
          }
      }
docs: {@inheritDoc}
  
  @throws DcGeneralInvalidPropertyValueException When the property is unable to accept the value.