Skip to content

Commit d7aa43e

Browse files
committed
Provide a getter for the OutputException and UnexpectedTokenException classes
1 parent 349d5ba commit d7aa43e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/Sabberworm/CSS/Parsing/OutputException.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
*/
88
class OutputException extends \Exception {
99
private $iLineNo;
10-
public function __construct($sMessage, $iLineNo = 0)
11-
{
10+
public function __construct($sMessage, $iLineNo = 0) {
1211
$this->$iLineNo = $iLineNo;
1312
if (!empty($iLineNo)) {
1413
$sMessage .= " [line no: $iLineNo]";
1514
}
1615
parent::__construct($sMessage);
1716
}
17+
18+
public function getLineNo() {
19+
return $this->getLine();
20+
}
1821
}

lib/Sabberworm/CSS/Parsing/UnexpectedTokenException.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@ public function __construct($sExpected, $sFound, $sMatchType = 'literal', $iLine
3434

3535
parent::__construct($sMessage);
3636
}
37+
38+
public function getLineNo() {
39+
return $this->getLine();
40+
}
3741
}

0 commit comments

Comments
 (0)