function SandboxValidationEvent::addErrorFromThrowable
Convenience method, adds an error validation result from a throwable.
Parameters
\Throwable $throwable: The throwable.
\Drupal\Core\StringTranslation\TranslatableMarkup|null $summary: (optional) The summary of error messages.
2 calls to SandboxValidationEvent::addErrorFromThrowable()
- SandboxValidationEvent::stopPropagation in core/
modules/ package_manager/ src/ Event/ SandboxValidationEvent.php - StatusCheckEvent::__construct in core/
modules/ package_manager/ src/ Event/ StatusCheckEvent.php - Constructs a StatusCheckEvent object.
File
-
core/
modules/ package_manager/ src/ Event/ SandboxValidationEvent.php, line 63
Class
- SandboxValidationEvent
- Base class for events dispatched before a stage life cycle operation.
Namespace
Drupal\package_manager\EventCode
public function addErrorFromThrowable(\Throwable $throwable, ?TranslatableMarkup $summary = NULL) : void {
$this->addResult(ValidationResult::createErrorFromThrowable($throwable, $summary));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.