Mistakes

What each sequence code error message means and how to fix the line.

If a line can't be read, the Sequence code pane's header shows the message with its line number, and so does the Problems panel. The diagram keeps its last working version until you fix it.

Error messages

MessageWhat to do
Can't read this line. A message looks like "Alice->Bob: Hello".Write the line as a message, or start it with a keyword such as note or alt.
Put the message after a colon: "Alice->Bob: Hello".Add a colon before the text.
Name a participant on both sides of the arrow.Add the missing sender or receiver.
Close the quote around this name.Add the closing ".
"…" is already declared on line …Declare each participant once. Change the first declaration instead.
Give the alias after "as": participant "Users DB" as DB.Write as before the alias.
Nothing goes after the alias.Remove what follows the alias.
Only participant lines go in a box. Close it with "end box" first.Move the line below end box, or close the box above it.
The box is never closed. Add "end box" after its last participant.Add end box after the box's last participant.
Close the box on line … before opening another.Add end box before the next box. A participant is in one box at most.
A box goes outside fragments, round participant declarations.Move the box out of the fragment, to the participant declarations.
"end box" has no box to close.Remove the extra end box.
"else" belongs inside an "alt" or a "par" block.Move the line inside an alt, or start the fragment with alt. and belongs inside a par, and option inside a critical.
A message starts with a head or a circle, not both.Write <-> or o->, not [<->.
Write this message left to right to give it a circle or a cross: "Bob->x Alice".Turn the line round: Alice<-x Bob becomes Bob->x Alice.
A message's delay is a whole number from 1 to 20: "Alice->(2)Bob: Hello".Change the number in brackets after the arrow.
Name the participant the message reaches.Name a participant on one side of [-> or ->].
Close this ref with "end ref", or put its text after a colon.Add end ref after the ref's last line.
"end" has no block to close.Remove the extra end.
"…" is never closed. Add "end" after its last line.Add end after the fragment's last line.
A note left of takes one participant. Write "note over A, B" to span several.Use note over for a note across several participants.
Close this note with "end note", or put its text after a colon.Add end note after the note's last line.

A missing colon

One mistake reads without an error, but not as you meant. In a message with no colon, such as App->DB Find user, the app reads DB Find user as the receiver's name.

If a participant appears that you didn't expect, check for a missing colon.

On this page