Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Definition.php

function Definition::addError

Add an error that occurred when building this Definition.

Return value

$this

File

vendor/symfony/dependency-injection/Definition.php, line 778

Class

Definition
Definition represents a service definition.

Namespace

Symfony\Component\DependencyInjection

Code

public function addError(string|\Closure|self $error) : static {
    if ($error instanceof self) {
        $this->errors = array_merge($this->errors, $error->errors);
    }
    else {
        $this->errors[] = $error;
    }
    return $this;
}
RSS feed
Powered by Drupal