Search code examples
umlnotationactivity-diagramexceptionhandler

UML Exception Handler Notation


What is the notation for an Exception Handler in UML activity diagrams? Is it just the lightning bolt? Or more than that?

According to the specification v2.5.1 page 404:

An ExceptionHandler is shown by drawing a “lightning bolt” symbol from the boundary of the protectedNode to a small square on the boundary of the ExceptionHandler.

To me, this sounds like a recursive explanation.

According to the abstract syntax (page 403), exception handlers are part of their protected node and are associated to the handlerBody (ExecutableNode), the exceptionInput (ObjectNode), and to exceptionTypes (Classifier).

My understanding is, that the exception handler is just the lighning bolt. The handlerBody, its objectNode, and the protectedNode are separate entities using their own notation.

Is someone able to clarify this?


Solution

  • You are right the Abstract Syntax seems more clear than the description for me.

    Exception Handler might be see like an edge. It is owned by its source, aka the protectedNode for the Exception Handler, and referring its target, aka the exceptionInput (owned by the handlerBody) in the Exception Handler case.

    Of course in most of the case the protectedNode and handlerBody are two differents Executable Node with their own notation (Structured Activity, Action ,etc. ).

    Last point is the exceptionType Classifier which is a reference to any Classifier on your model.

    Hoping it clarifies things. EBR