ExceptionContainer.php in Drupal 9
Same filename and directory in other branches
Namespace
Drupal\FunctionalTests\BootstrapFile
core/tests/Drupal/FunctionalTests/Bootstrap/ExceptionContainer.phpView source
<?php
namespace Drupal\FunctionalTests\Bootstrap;
use Drupal\Core\DependencyInjection\Container;
/**
* Base container which throws an exception.
*/
class ExceptionContainer extends Container {
/**
* {@inheritdoc}
*/
public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) {
if ($id === 'http_kernel') {
throw new \Exception('Thrown exception during Container::get');
}
else {
return parent::get($id, $invalidBehavior);
}
}
}
Classes
Name | Description |
---|---|
ExceptionContainer | Base container which throws an exception. |