Repeating Return = Nowhere to return to

+1 vote
asked Apr 11, 2024 in Bug by danespin (200 points)

The following sequence diagram fails with a message "Nowhere to return to" when duplicated in alt / else blocks, using latest version 1.2024.4:

@startuml

autonumber

skinparam strict uml

box "app"

    actor A

    actor B

end box

A -> B  : first call

alt #HoneyDew Success

    return OK

else #MistyRose Failure

    return NO OK

end

@enduml

https://www.plantuml.com/plantuml/png/JSv1IiL03CRnVKxnqQwzW0jfYuWWMj0JfDC8WzEPacJmzVPlNbVTXF_Y5_W6SrQlMoBYwYNNRH4b-ujvP-KDvXg3um6MSaF7-zuH073meXWlFP7a5KqHZNXwmGGyupUgEGAdH9mS_Nl9ShpAFtvg269s_gjurOpvWoIPeF-CviTtQVd6CLMLg_gQJvXNeg7TjkmE

commented Apr 11, 2024 by danespin (200 points)
Commenting any of the return statements will render output, but without the corresponding return.

Expected: to return from B to A in both cases, but with different messages.

1 Answer

0 votes
answered Mar 8 by dickmaley (4,020 points)

Does this work?

image

@startuml

autonumber

skinparam strict uml

box "app"

    actor A
    actor B

end box

A -> B  : first call

alt #HoneyDew Success
    B -> A : return OK
else #MistyRose Failure
    B -> A : return NO OK
end

@enduml

commented Mar 10 by The-Lu (79,040 points)

Hi,

  • In which version?

Because on last version, we observe always the defect:

Regards,
Th.

...