xref: /plugin/combo/vendor/antlr/antlr4-php-runtime/src/Error/Exceptions/ParseCancellationException.php (revision 37748cd8654635afbeca80942126742f0f4cc346)
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