<?php
/**
 * @license MIT
 *
 * Modified by __root__ on 21-May-2026 using Strauss.
 * @see https://github.com/BrianHenryIE/strauss
 */

namespace Printus\Sabberworm\CSS\Parsing;

use Printus\Sabberworm\CSS\Position\Position;
use Printus\Sabberworm\CSS\Position\Positionable;

class SourceException extends \Exception implements Positionable
{
    use Position;

    /**
     * @param string $sMessage
     * @param int $iLineNo
     */
    public function __construct($sMessage, $iLineNo = 0)
    {
        $this->setPosition($iLineNo);
        if (!empty($iLineNo)) {
            $sMessage .= " [line no: $iLineNo]";
        }
        parent::__construct($sMessage);
    }
}
