function ComposerStagerExceptionTrait::throwExceptionIfSet
Throws the exception if set.
3 calls to ComposerStagerExceptionTrait::throwExceptionIfSet()
- LoggingBeginner::begin in core/
modules/ package_manager/ tests/ modules/ package_manager_bypass/ src/ LoggingBeginner.php - LoggingCommitter::commit in core/
modules/ package_manager/ tests/ modules/ package_manager_bypass/ src/ LoggingCommitter.php - NoOpStager::stage in core/
modules/ package_manager/ tests/ modules/ package_manager_bypass/ src/ NoOpStager.php
File
-
core/
modules/ package_manager/ tests/ modules/ package_manager_bypass/ src/ ComposerStagerExceptionTrait.php, line 34
Class
- ComposerStagerExceptionTrait
- Trait to make Composer Stager throw pre-determined exceptions in tests.
Namespace
Drupal\package_manager_bypassCode
private function throwExceptionIfSet() : void {
if ($exception = $this->state
->get(static::class . '-exception')) {
$class = array_shift($exception);
throw new $class(...$exception);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.