xref: /template/strap/vendor/antlr/antlr4-php-runtime/src/Error/Exceptions/ParseCancellationException.php (revision 977ce05d19d8dab0a70c9a27f8da0b7039299e82)
1<?php
2
3declare(strict_types=1);
4
5namespace Antlr\Antlr4\Runtime\Error\Exceptions;
6
7class ParseCancellationException extends \LogicException
8{
9    public static function from(\Throwable $exception) : self
10    {
11        return new self($exception->getMessage(), $exception->getCode(), $exception);
12    }
13}
14