| 1 |
Error Reporting |
| 2 |
=============== |
| 3 |
|
| 4 |
Errors are returned by the Parser and Sanitizer as arrays |
| 5 |
|
| 6 |
[ $code, $line, $character, ... ] |
| 7 |
|
| 8 |
`$code` is a short string, with values and definitions listed below. `$line` |
| 9 |
and `$character` indicate the location of the error. Some errors may have |
| 10 |
additional parameters after the character, as described below. |
| 11 |
|
| 12 |
Error Tags |
| 13 |
---------- |
| 14 |
|
| 15 |
* **at-rule-block-not-allowed**: An at-rule was provided with a block, but that |
| 16 |
type of at-rule cannot take a block. One extra parameter, the name of the |
| 17 |
at-rule in question. |
| 18 |
|
| 19 |
* **at-rule-block-required**: An at-rule needs a block but was not provided |
| 20 |
with one. One extra parameter, the name of the at-rule in question. |
| 21 |
|
| 22 |
* **bad-character-in-url**: An invalid character was encountered while parsing |
| 23 |
a (non-quoted) `url()`. |
| 24 |
|
| 25 |
* **bad-escape**: An invalid character was encountered while parsing an escape |
| 26 |
sequence. |
| 27 |
|
| 28 |
* **bad-value-for-property**: A property was supplied with an invalid or |
| 29 |
unsupported value. One extra parameter, the name of the property in question. |
| 30 |
|
| 31 |
* **expected-at-rule**: An at-rule was expected but something else was found. |
| 32 |
One extra parameter, the name of the at-rule in question. |
| 33 |
|
| 34 |
* **expected-colon**: A colon was expected, but something else was found. |
| 35 |
|
| 36 |
* **expected-declaration**: A declaration was expected, but something else was |
| 37 |
found. |
| 38 |
|
| 39 |
* **expected-declaration-list**: A list of declarations was expected, but |
| 40 |
something else was found. |
| 41 |
|
| 42 |
* **expected-eof**: The end of the input was expected, but there was additional |
| 43 |
input. |
| 44 |
|
| 45 |
* **expected-ident**: An identifier was expected, but something else was found. |
| 46 |
|
| 47 |
* **expected-page-margin-at-rule**: One of the margin at-rules for `page` was |
| 48 |
expected, but something else was found. |
| 49 |
|
| 50 |
* **expected-qualified-rule**: A qualified rule (e.g. a style rule rather than |
| 51 |
an at-rule) was expected, but something else was found. |
| 52 |
|
| 53 |
* **expected-stylesheet**: A stylesheet or list of rules was expected, but |
| 54 |
something else was found. |
| 55 |
|
| 56 |
* **invalid-font-face-at-rule**: The `font-face` rule cannot have anything in |
| 57 |
between the `font-face` and the block. |
| 58 |
|
| 59 |
* **invalid-font-feature-value**: The feature value at-rules inside |
| 60 |
`font-feature-values` cannot have anything in between the at-keyword and the |
| 61 |
block. One extra parameter, the name of the at-rule in question. |
| 62 |
|
| 63 |
* **invalid-font-feature-value-declaration**: The feature value at-rules inside |
| 64 |
a `font-feature-values` map arbitrary identifiers to one or more numbers. |
| 65 |
Either a non-number was provided or an incorrect number of numbers were |
| 66 |
provided. One extra parameter, the name of the at-rule in question. |
| 67 |
|
| 68 |
* **invalid-font-feature-values-font-list**: An invalid font list was supplied |
| 69 |
for `font-feature-values`. |
| 70 |
|
| 71 |
* **invalid-import-value**: An invalid URL and/or media query was provided for |
| 72 |
`import`. |
| 73 |
|
| 74 |
* **invalid-keyframe-name**: An invalid keyframe name was supplied for |
| 75 |
`keyframes`. |
| 76 |
|
| 77 |
* **invalid-media-query**: An invalid media query was supplied for `media`. |
| 78 |
|
| 79 |
* **invalid-namespace-value**: An invalid value was supplied for `namespace`. |
| 80 |
|
| 81 |
* **invalid-page-margin-at-rule**: The margin at-rules inside `page` cannot |
| 82 |
have anything in between the at-keyword and the block. One extra parameter, |
| 83 |
the name of the at-rule in question. |
| 84 |
|
| 85 |
* **invalid-page-rule-content**: A `page` at-rule may contain only |
| 86 |
declarations and margin at-rules. Something else was found. |
| 87 |
|
| 88 |
* **invalid-page-selector**: An invalid page selector was supplied for `page`. |
| 89 |
|
| 90 |
* **invalid-selector-list**: An invalid selector was supplied for a style rule. |
| 91 |
|
| 92 |
* **invalid-supports-condition**: An invalid condition was supplied for |
| 93 |
`supports`. |
| 94 |
|
| 95 |
* **misordered-rule**: A rule ordering requirement (e.g. that `import` must |
| 96 |
come before `namespace`) was violated. |
| 97 |
|
| 98 |
* **missing-font-feature-values-font-list**: No font list was supplied for |
| 99 |
`font-feature-values`. |
| 100 |
|
| 101 |
* **missing-import-source**: No URL was supplied for `import`. |
| 102 |
|
| 103 |
* **missing-keyframe-name**: No keyframe name was supplied for `keyframes`. |
| 104 |
|
| 105 |
* **missing-namespace-value**: No namespace was supplied for `namespaces`. |
| 106 |
|
| 107 |
* **missing-selector-list**: No selector was supplied for a style rule. |
| 108 |
|
| 109 |
* **missing-supports-condition**: No condition was supplied for `supports`. |
| 110 |
|
| 111 |
* **missing-value-for-property**: No value was supplied for a property. One |
| 112 |
extra parameter, the name of the property in question. |
| 113 |
|
| 114 |
* **newline-in-string**: A newline was encountered inside a quoted string. |
| 115 |
|
| 116 |
* **recursion-depth-exceeded**: Blocks and/or functions were nested too deeply. |
| 117 |
The rest of the input was ignored. |
| 118 |
|
| 119 |
* **unclosed-comment**: An unclosed comment was encountered. |
| 120 |
|
| 121 |
* **unclosed-string**: An unclosed string was encountered. |
| 122 |
|
| 123 |
* **unclosed-url**: An unclosed (non-quoted) `url()` was encountered. |
| 124 |
|
| 125 |
* **unexpected-eof**: The end of the input was encountered unexpectedly. |
| 126 |
|
| 127 |
* **unexpected-eof-in-block**: The end of the input was encountered |
| 128 |
unexpectedly while parsing a block. |
| 129 |
|
| 130 |
* **unexpected-eof-in-function**: The end of the input was encountered |
| 131 |
unexpectedly while parsing a function. |
| 132 |
|
| 133 |
* **unexpected-eof-in-rule**: The end of the input was encountered unexpectedly |
| 134 |
while parsing a rule. |
| 135 |
|
| 136 |
* **unexpected-token-in-declaration-list**: An unexpected token was encountered |
| 137 |
while parsing a list of declarations or a list of declarations-and-at-rules. |
| 138 |
|
| 139 |
* **unrecognized-property**: A property was encountered that is not recognized |
| 140 |
in the current context. |
| 141 |
|
| 142 |
* **unrecognized-rule**: A rule was encountered that is not recognized in the |
| 143 |
current context. |