comparison core/modules/system/src/Tests/Bootstrap/ExceptionContainer.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 namespace Drupal\system\Tests\Bootstrap;
4
5 use Drupal\Core\DependencyInjection\Container;
6
7 /**
8 * Base container which throws an exception.
9 */
10 class ExceptionContainer extends Container {
11
12 /**
13 * {@inheritdoc}
14 */
15 public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) {
16 if ($id === 'http_kernel') {
17 throw new \Exception('Thrown exception during Container::get');
18 }
19 else {
20 return parent::get($id, $invalidBehavior);
21 }
22 }
23
24 }