Yaffs site version 1.1
[yaffs-website] / vendor / symfony / expression-language / SyntaxError.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\ExpressionLanguage;
13
14 class SyntaxError extends \LogicException
15 {
16     public function __construct($message, $cursor = 0, $expression = '')
17     {
18         $message = sprintf('%s around position %d', $message, $cursor);
19         if ($expression) {
20             $message = sprintf('%s for expression `%s`', $message, $expression);
21         }
22         $message .= '.';
23
24         parent::__construct($message);
25     }
26 }