# media-cloud-sync/1.4.2/includes/sdk/s3/Aws/EndpointV2/Rule/ErrorRule.php

Media Cloud Sync, version 1.4.2. 39 lines.

- Page: https://pluginprobe.com/plugins/media-cloud-sync/1.4.2/code/includes/sdk/s3/Aws/EndpointV2/Rule/ErrorRule.php
- Raw: https://pluginprobe.com/plugins/media-cloud-sync/1.4.2/raw/includes/sdk/s3/Aws/EndpointV2/Rule/ErrorRule.php
- Modified: 2025-08-17T07:06:28+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/media-cloud-sync/1.4.2/code/includes/sdk/s3/Aws/EndpointV2/Rule/ErrorRule.php#L10-L20`.

```php
<?php

namespace Dudlewebs\WPMCS\s3\Aws\EndpointV2\Rule;

use Dudlewebs\WPMCS\s3\Aws\EndpointV2\Ruleset\RulesetStandardLibrary;
use Dudlewebs\WPMCS\s3\Aws\Exception\UnresolvedEndpointException;
class ErrorRule extends AbstractRule
{
    /** @var array */
    private $error;
    public function __construct($definition)
    {
        parent::__construct($definition);
        $this->error = $definition['error'];
    }
    /**
     * @return array
     */
    public function getError()
    {
        return $this->error;
    }
    /**
     * If an error rule's conditions are met, raise an
     * UnresolvedEndpointError containing the fully resolved error string.
     *
     * @return null
     * @throws UnresolvedEndpointException
     */
    public function evaluate(array $inputParameters, RulesetStandardLibrary $standardLibrary)
    {
        if ($this->evaluateConditions($inputParameters, $standardLibrary)) {
            $message = $standardLibrary->resolveValue($this->error, $inputParameters);
            throw new UnresolvedEndpointException($message);
        }
        return \false;
    }
}

```
