@@ -44,7 +44,7 @@ private function parseList(CSSList $oList, $bIsRoot = false) {
44
44
} else if ($ this ->comes ('} ' )) {
45
45
$ this ->consume ('} ' );
46
46
if ($ bIsRoot ) {
47
- throw new Exception ("Unopened { " );
47
+ throw new \ Exception ("Unopened { " );
48
48
} else {
49
49
return ;
50
50
}
@@ -54,7 +54,7 @@ private function parseList(CSSList $oList, $bIsRoot = false) {
54
54
$ this ->consumeWhiteSpace ();
55
55
}
56
56
if (!$ bIsRoot ) {
57
- throw new Exception ("Unexpected end of document " );
57
+ throw new \ Exception ("Unexpected end of document " );
58
58
}
59
59
}
60
60
@@ -97,7 +97,7 @@ private function parseAtRule() {
97
97
private function parseIdentifier ($ bAllowFunctions = true ) {
98
98
$ sResult = $ this ->parseCharacter (true );
99
99
if ($ sResult === null ) {
100
- throw new Exception ("Identifier expected, got {$ this ->peek (5 )}" );
100
+ throw new \ Exception ("Identifier expected, got {$ this ->peek (5 )}" );
101
101
}
102
102
$ sCharacter ;
103
103
while (($ sCharacter = $ this ->parseCharacter (true )) !== null ) {
@@ -133,7 +133,7 @@ private function parseStringValue() {
133
133
while (!$ this ->comes ($ sQuote )) {
134
134
$ sContent = $ this ->parseCharacter (false );
135
135
if ($ sContent === null ) {
136
- throw new Exception ("Non-well-formed quoted string {$ this ->peek (3 )}" );
136
+ throw new \ Exception ("Non-well-formed quoted string {$ this ->peek (3 )}" );
137
137
}
138
138
$ sResult .= $ sContent ;
139
139
}
@@ -214,7 +214,7 @@ private function parseRule() {
214
214
$ this ->consumeWhiteSpace ();
215
215
$ sImportantMarker = $ this ->consume (strlen ('important ' ));
216
216
if (mb_convert_case ($ sImportantMarker , MB_CASE_LOWER ) !== 'important ' ) {
217
- throw new Exception ("! was followed by “ " .$ sImportantMarker ."”. Expected “important” " );
217
+ throw new \ Exception ("! was followed by “ " .$ sImportantMarker ."”. Expected “important” " );
218
218
}
219
219
$ oRule ->setIsImportant (true );
220
220
}
@@ -403,13 +403,13 @@ private function consume($mValue = 1) {
403
403
if (is_string ($ mValue )) {
404
404
$ iLength = mb_strlen ($ mValue , $ this ->sCharset );
405
405
if (mb_substr ($ this ->sText , $ this ->iCurrentPosition , $ iLength , $ this ->sCharset ) !== $ mValue ) {
406
- throw new Exception ("Expected $ mValue, got " .$ this ->peek (5 ));
406
+ throw new \ Exception ("Expected $ mValue, got " .$ this ->peek (5 ));
407
407
}
408
408
$ this ->iCurrentPosition += mb_strlen ($ mValue , $ this ->sCharset );
409
409
return $ mValue ;
410
410
} else {
411
411
if ($ this ->iCurrentPosition +$ mValue > $ this ->iLength ) {
412
- throw new Exception ("Tried to consume $ mValue chars, exceeded file end " );
412
+ throw new \ Exception ("Tried to consume $ mValue chars, exceeded file end " );
413
413
}
414
414
$ sResult = mb_substr ($ this ->sText , $ this ->iCurrentPosition , $ mValue , $ this ->sCharset );
415
415
$ this ->iCurrentPosition += $ mValue ;
@@ -422,7 +422,7 @@ private function consumeExpression($mExpression) {
422
422
if (preg_match ($ mExpression , $ this ->inputLeft (), $ aMatches , PREG_OFFSET_CAPTURE ) === 1 ) {
423
423
return $ this ->consume ($ aMatches [0 ][0 ]);
424
424
}
425
- throw new Exception ("Expected pattern $ mExpression not found, got: {$ this ->peek (5 )}" );
425
+ throw new \ Exception ("Expected pattern $ mExpression not found, got: {$ this ->peek (5 )}" );
426
426
}
427
427
428
428
private function consumeWhiteSpace () {
@@ -449,7 +449,7 @@ private function isEnd() {
449
449
private function consumeUntil ($ sEnd ) {
450
450
$ iEndPos = mb_strpos ($ this ->sText , $ sEnd , $ this ->iCurrentPosition , $ this ->sCharset );
451
451
if ($ iEndPos === false ) {
452
- throw new Exception ("Required $ sEnd not found, got {$ this ->peek (5 )}" );
452
+ throw new \ Exception ("Required $ sEnd not found, got {$ this ->peek (5 )}" );
453
453
}
454
454
return $ this ->consume ($ iEndPos -$ this ->iCurrentPosition );
455
455
}
0 commit comments