Create's a new error instance with the values from the passed array.

@param array $error The array containing the error information

@return \AppserverIo\Appserver\Core\Utilities\ErrorInterface The error instance
430192
public function fromArray(array $error)
    {

        // extract the array with the error information
        list ($type, $message, $file, $line) = array_values($error);

        // initialize and return the error instance
        return new Error($type, $message, $file, $line);
    }
274022
public function response(array $errors)
    {
        if (($this->ajax() && ! $this->pjax()) || $this->wantsJson()) {
            return new JsonResponse($errors, ValidationException::VALIDATION_FAILED);
        }

        return $this->redirector->to($this->getRedirectUrl())
            ->withInput($this->except($this->dontFlash))
            // This makes errors display properly (original errors are placed under the key 'errors' instead of 'error')
            ->with('error', $this->getValidatorInstance()->getMessageBag());
    }
1295560
public function addError($error) {
        // Make sure that we don't try to index an error that doesn't
        // contain an index value.
        if ($error->getErrorCode() == null) {
            require_once 'Zend/Gdata/App/Exception.php';
            throw new Zend_Gdata_App_Exception("Error encountered without corresponding error code.");
        }

        $this->_errors[$error->getErrorCode()] = $error;
    }
909602
public function error($error, $code = 0)
    {
        $this->_errors[] = $error instanceof Error ? $error : new Error($code, $error);
    }
606503
public function addError($error)
    {
        if (\is_string($error)) {
            $error = new UserError($error);
        } elseif (!\is_object($error) || !$error instanceof \GraphQL\Error\UserError) {
            throw new \InvalidArgumentException(\sprintf('Error must be string or instance of %s.', \GraphQL\Error\UserError::class));
        }

        $this->errors[] = $error;

        return $this;
    }
648685
public function int($error) {
        if ($this->_exist) {
            array_push($this->_constraints, ['type' => self::INT, 'message' => $error]);
        }

        return $this;
    }
461467
public function addError(string $error, array $options = []) {
        $this->validation->addError($this->getName(), $error, $options);
        return $this;
    }
757568
public function response(array $errors)
    {
        if ($this->ajax() || $this->wantsJson()) {
            return new JsonResponse($errors, 422);
        }

        return $this->redirector->to($this->getRedirectUrl())
            ->withInput($this->except($this->dontFlash))
            ->withErrors($errors, $this->errorBag);
    }
240190
public function withError(string $error): PayloadInterface
    {
        if ($this->error === $error) {
            return $this;
        }

        $clone = clone $this;
        $clone->error = $error;

        return $clone;
    }
830443
public function alpha($error) {
        if ($this->_exist) {
            array_push($this->_constraints, ['type' => self::ALPHA, 'message' => $error]);
        }

        return $this;
    }
123987
public function addErrors(array $errors)
    {
        foreach ($errors as $error) {
            if (!$error instanceof ValidationError)
                throw new Exception('Error was not instance of ValidationError: '.$error);
            if (!in_array($error, $this->errors))
                $this->errors[] = $error;
        }

        return $this;
    }
1229410
protected function addError($error)
	{
		$this->errors[] = new FileError($error, $this->config['langCallback']);
		$this->isValid = false;
	}
674263
public function createProfileFailed(array $errors)
    {
        messages('error', trans('orchestra/foundation::response.db-failed', $errors));

        return $this->redirect($this->getRedirectToRegisterPath())->withInput();
    }
297305
private function formatErrorMessage($errors = array())
    {
        $melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
        $appConfigForm = $melisMelisCoreConfig->getItem('meliscore/forms/melis_core_platform_scheme_form');
        $appConfigForm = $appConfigForm['elements'];

        foreach ($errors as $keyError => $valueError) {
            foreach ($appConfigForm as $keyForm => $valueForm) {
                if ($valueForm['spec']['name'] == $keyError &&
                    !empty($valueForm['spec']['options']['label'])
                )
                    $errors[$keyError]['label'] = $valueForm['spec']['options']['label'];
            }
        }

        return $errors;
    }
27113
public function formatErrors(array $errors)
   {
      $tmp = [];
      $len = count($errors);
      if ($len === 0) {
         throw new InvalidArgumentException(
            "invalid value provided for 'errors'; expecting an array that ".
            "contains at least one instance of sndsgd\\field\\Error"
         );
      }

      $noun = ($len === 1) ? 'option' : 'options';
      $tmp = ["failed to process $noun"];
      foreach ($errors as $error) {
         $name = $error->getName();
         $message = $error->getMessage();
         if (!array_key_exists($name, $tmp)) {
            $tmp[$name] = " @[bold]$name@[reset] → $message";
         }
      }
      return implode(PHP_EOL, array_values($tmp)).PHP_EOL;
   }
1008051
public function ip($error) {
        if ($this->_exist) {
            array_push($this->_constraints, ['type' => self::IP, 'message' => $error]);
        }

        return $this;
    }
1016582
public function ParseErrorParameter(array $Error)
    {
        $CPFErr = false;
        if (!is_array($Error)) {
            return false;
        }

        // If there's an error structure and some error info was returned.
        if (isset($Error['exceptId']) && ($Error['err_bytes_avail'] > 0)) {
            $CPFErr = $Error['exceptId'];
        }

        return $CPFErr;
    }