| 1 |
<?php declare(strict_types=1); |
| 2 |
|
| 3 |
namespace PhpParser\ErrorHandler; |
| 4 |
|
| 5 |
use PhpParser\Error; |
| 6 |
use PhpParser\ErrorHandler; |
| 7 |
|
| 8 |
/** |
| 9 |
* Error handler that handles all errors by throwing them. |
| 10 |
* |
| 11 |
* This is the default strategy used by all components. |
| 12 |
*/ |
| 13 |
class Throwing implements ErrorHandler { |
| 14 |
public function handleError(Error $error): void { |
| 15 |
throw $error; |
| 16 |
} |
| 17 |
} |
| 18 |
|