In an Activity diagram, when an if-conditional contains an elseif and the else path is terminated with a stop, there is an Exception thrown. Example:
@startuml
start
if (condition A) then (yes)
:Text 1;
elseif (condition B) then (yes)
:Text 2;
else (nothing)
:Text else;
' This is the stop causing the problem
stop
endif
stop
@enduml
Note that if the conditional does not contain an elsif element, then everything works as expected:
@startuml
start
if (condition A) then (yes)
:Text 1;
else (nothing)
:Text else;
' This works fine
stop
endif
stop
@enduml