summaryrefslogtreecommitdiff
path: root/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php
blob: aeee989b1a6bfc9e68ee6f05cc016d7febdb1053 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php declare(strict_types=1);

namespace PhpParser\ErrorHandler;

use PhpParser\Error;
use PhpParser\ErrorHandler;

/**
 * Error handler that handles all errors by throwing them.
 *
 * This is the default strategy used by all components.
 */
class Throwing implements ErrorHandler
{
    public function handleError(Error $error) {
        throw $error;
    }
}