xref: /template/strap/vendor/antlr/antlr4-php-runtime/src/Error/Exceptions/ParseCancellationException.php (revision 82a60d039cd81033dc8147c27f0a50716b7a5301)
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