1: <?php
2: /**
3: * This file is part of the Autarky package.
4: *
5: * (c) Andreas Lutro <anlutro@gmail.com>
6: *
7: * For the full copyright and license information, please view the LICENSE
8: * file that was distributed with this source code.
9: */
10:
11: namespace Autarky\Errors;
12:
13: use Exception;
14:
15: /**
16: * Stub error handler that simply re-throws the exceptions given.
17: *
18: * Written primarily for testing purposes.
19: *
20: * @codeCoverageIgnore
21: */
22: class StubErrorHandler implements ErrorHandlerManagerInterface
23: {
24: /**
25: * {@inheritdoc}
26: */
27: public function setDebug($toggle)
28: {
29: //
30: }
31:
32: /**
33: * {@inheritdoc}
34: */
35: public function setRethrow($toggle)
36: {
37: //
38: }
39:
40: /**
41: * {@inheritdoc}
42: */
43: public function setLogger($logger)
44: {
45: //
46: }
47:
48: /**
49: * {@inheritdoc}
50: */
51: public function appendHandler($handler)
52: {
53: //
54: }
55:
56: /**
57: * {@inheritdoc}
58: */
59: public function prependHandler($handler)
60: {
61: //
62: }
63:
64: /**
65: * {@inheritdoc}
66: */
67: public function setDefaultHandler(ErrorHandlerInterface $handler)
68: {
69: //
70: }
71:
72: /**
73: * {@inheritdoc}
74: */
75: public function register()
76: {
77: //
78: }
79:
80: /**
81: * {@inheritdoc}
82: */
83: public function handle(Exception $exception)
84: {
85: throw $exception;
86: }
87: }
88: