summaryrefslogtreecommitdiffstats
path: root/vendor/ipl/web/src/Filter/ParseException.php
blob: bcafd09a1b5b24291de9da168b89b4e85de6e9e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php

namespace ipl\Web\Filter;

use Exception;

class ParseException extends Exception
{
    protected $char;

    protected $charPos;

    public function __construct($filter, $char, $charPos, $extra)
    {
        parent::__construct(sprintf(
            'Invalid filter "%s", unexpected %s at pos %d%s',
            $filter,
            $char,
            $charPos,
            $extra
        ));

        $this->char = $char;
        $this->charPos = $charPos;
    }

    public function getChar()
    {
        return $this->char;
    }

    public function getCharPos()
    {
        return $this->charPos;
    }
}