Throwing.php 368 B

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