Throwing.php 362 B

123456789101112131415161718
  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. {
  12. public function handleError(Error $error) {
  13. throw $error;
  14. }
  15. }