Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit b076fd5

Browse files
committed
document error codes
1 parent 6c9a591 commit b076fd5

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

SPEC.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,3 +261,31 @@ When cleaning a guide notation string, errors will be denoted in curly brackets.
261261
```
262262
| 10px | { 10foo [1]} | 10px|
263263
```
264+
265+
### Possible errors
266+
267+
These scenarios will invalidate guide notation
268+
269+
##### Error: 1 — Unrecognized command
270+
271+
The parser does not understand the given command, or no unit was specified.
272+
273+
##### Error: 2 — No grids
274+
275+
A guide notation string must contain at least one grid.
276+
277+
##### Error: 3 — Wildcards cannot be fills
278+
279+
Because wildcards have no width of their own, trying to use them as a fill is dividing by zero.
280+
281+
#### Error: 4 — Grids can only contain one fill
282+
283+
Because fills are used to fill up all available space, it isn't possible to have more than one fill.
284+
285+
##### Error: 5 — Variables cannot contain fills
286+
287+
Because variables are intended for using multiple times, placing a fill in a variable would result in multiple fills. Technically this *should* be valid if the variable is only used once, however the logic to support this isn't worth supporting a case that technically shouldn't be used.
288+
289+
##### Error: 6 — A variable must be defined
290+
291+
If a variable has not been defined at the time it is called, it cannot be used.

0 commit comments

Comments
 (0)