protected static function trySetValue($provider, &$object, $propertyName, $value, &$error)
    {
        try {
            return call_user_func(array($provider, 'setValue'), $object, $propertyName, $value);
        } catch (\InvalidArgumentException $e) {
            $error = $e;
            return null;
        }
    }