Errors
This page lists the errors you are most likely to meet, grouped by cause, with the source that causes each. Search the page for the words of your message.
Errors have the form file:line:col: error: message, and drumlin reports only the first error in a file.
The messages below are real: drumlin produced them while this book was built, without the file prefix.
For the command-line errors, see Command line.
Unknown names
An element must be declared somewhere in the file. drumlin suggests the closest declared name.
component Scheduler
component Worker
Scheduelr --> Worker
drumlin says:
3:1: error: unknown element `Scheduelr`; did you mean `Scheduler`?
Duplicate declarations
A name or alias may be declared once.
component Worker
component Worker
drumlin says:
2:11: error: `Worker` is already declared
Unclosed blocks
component Outer {
component Inner
drumlin says:
2:1: error: missing `}` for `Outer`
Unmatched braces
component Lonely
}
drumlin says:
2:1: error: unmatched `}`
Invalid nesting
A member drawn inside its owner needs no containment line: see Containment.
diagram package
package Outer { class Inner }
Outer +-- Inner
drumlin says:
3:1: error: `Inner` is drawn inside `Outer`, so containment needs no line; declare `Inner` outside the `Outer` block
Misplaced statements
provides, requires and port belong inside a component: see
Interface.
provides IFoo
drumlin says:
1:1: error: `provides` and `requires` belong inside a component
Ambiguous ports
A port name used by two components must be written as <component>.<port>: see
Port.
component A { port data }
component B { port data }
component C
data --> C
drumlin says:
4:1: error: port `data` is ambiguous; write `<component>.data`
Unimplemented diagram kinds
drumlin draws five kinds: see File basics.
diagram timing "Handshake"
drumlin says:
1:1: error: diagram kind `timing` is not implemented; this prototype supports `component`, `package`, `sequence`, `state`, `activity`
Layout engines
An unknown engine name lists the engines, or suggests a near one. See Layout engine.
diagram state
layout dot
[*] --> Idle
drumlin says:
2:8: error: unknown layout engine `dot`; the engines are `longest-path`, `network-simplex`
Sequence and activity diagrams have their own layouts.
diagram sequence
layout longest-path
participant Client
drumlin says:
2:1: error: sequence diagrams have their own layout; layout engines apply to component, package and state diagrams
drumlin render --layout <engine> reports an unknown name as error: unknown layout engine ..., without a
file or position, and a sequence or activity file at its diagram header.
Styles
An unknown style name lists the styles, or suggests a near one. Every kind takes a style; see Styles.
diagram sequence
style sketch
participant Client
drumlin says:
2:7: error: unknown style `sketch`; the styles are `pens`, `plain`, `lettering`
drumlin render --style <name> reports an unknown name as error: unknown style ..., without a file or
position, for example error: unknown style plan; did you mean plain?.
Sequence diagrams
See Sequence diagrams for the syntax. Names must be declared before use, so a typo is caught where it happens.
diagram sequence
participant Server
Servre -> Server : ping
drumlin says:
3:1: error: unknown participant `Servre`; did you mean `Server`?; declare it with `participant` before its first use
A return needs a message block to return from.
diagram sequence
participant A
return done
drumlin says:
3:1: error: `return` belongs inside a message block
A fragment continuation must match its opener.
diagram sequence
participant A
participant B
opt "x" {
A -> B : y
} else {
B -> A : z
}
drumlin says:
6:3: error: `else` must follow the `}` of an `alt`
State diagrams
See State diagrams and Pseudostates for the rules. Rules from UML 2.5.1 clause 14 are checked. A fork, for example, needs one incoming and at least two outgoing transitions.
diagram state
fork f
A --> f
f --> B
drumlin says:
2:6: error: fork `f` needs exactly one incoming and at least two outgoing transitions
A name used only once, close to another name, is reported as a likely typo. Write
state Idel first if the state really has that name.
diagram state
state Idle
[*] --> Idle
Idle --> Idel : wait
drumlin says:
4:10: error: unknown state `Idel`; did you mean `Idle`? declare it with `state Idel` if intended
A transition leaving a pseudostate cannot have a trigger.
diagram state
choice c
A --> c
c --> B : go
drumlin says:
4:7: error: a transition leaving a pseudostate cannot have a trigger; use `[guard] / effect`
A transition cannot join two orthogonal regions of one state.
diagram state
state A {
region {
[*] --> B
}
region {
[*] --> C
C --> B
}
}
drumlin says:
8:5: error: a transition cannot join two orthogonal regions of `A`
Activity diagrams
See Rules from the specification. Statements after the end of a flow can never run.
diagram activity
start
stop
action "Late"
drumlin says:
4:1: error: this statement can never run: the flow already ended with `stop` on line 3; remove it, or move it before the end
Every branch of a fork needs a step.
diagram activity
start
fork {
action "A"
} and {
}
stop
drumlin says:
5:3: error: this `fork` branch is empty; each branch needs a step, or remove the branch
A flow must not end on a merge, because a merge has one outgoing flow.
diagram activity
start
if "x" {
action "A"
}
drumlin says:
3:1: error: the flow continues after this `if` but nothing follows; add a step, or end it with `stop` or `end`
When a diagram uses lanes, every action must be in one.
diagram activity
lane "A" {
}
start
action "B"
stop
drumlin says:
5:1: error: this diagram uses lanes, so this `action` must be inside a `lane` block