Error handling
The compiler never throws away the document over one bad line. It is forgiving by design: it always produces the best diagram it can and reports what it could not use, so a typo never leaves you with a blank canvas.
- An unparseable line is skipped, with a
line N: …diagnostic. - An unknown attribute word, icon, shape, or colour is ignored with a diagnostic; the rest of the line still applies.
- An edge to an undeclared name auto-declares the node (graph and sequence); ERD and class relations to unknown entities are dropped, since those families require a declaration.
- Duplicate ids or names: the first declaration wins, and later ones fill in attributes the first did not set.
- The result passes through the same sanitizer the streamed AI output goes through.
Diagnostics keep drawing#
The example below has three problems: an unknown colour, an unknown shape, and a self-edge. The diagram still renders, and each problem reports underneath.
Server [chartreuse]
Cache [octahedron, blue]
Server -> Server
Server -> Cache
diagnostic · line 1: unknown attribute "chartreuse"
diagnostic · line 2: unknown attribute "octahedron"
diagnostic · line 3: self-edges are not drawn
Partial lines still apply#
An unknown word in an attribute list is dropped on its own; the words around it are still used. Here the colour survives even though the shape word is unknown.
Node [octahedron, blue, bold]
Other [rectangle, green]
Node -> Other
diagnostic · line 1: unknown attribute "octahedron"
Severity#
Diagnostics come in two severities. A warning (amber) means something was ignored but the diagram is intact: an unknown word, a dropped self-edge. An error (red) means a whole line could not be parsed. Both surface in the code panel, keyed to the line, and neither stops the diagram from rendering.