• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Modeling the exception in interaction diagrams

Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do we model exception handling in interaction diagram? or is it just similar to modeling a condition?
thank you,
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In UML, exceptions are a specialisation of signals.
In a sequence diagram, exceptions are modelled as asynchronous messages (in UML 1.4, this is shown as an stick arrow. UML 1.3 used half arrow heads).
I'll avoid an ASCII representation, but the basic notation would be:
A calls B.something() - shown as a solid arrow between A and B.
B 'throws' an exception which is caught by A. Show this with a stick arrow from B to A. Label the message with the name of the exception e.g. SQLException(). You can optionally mark this message with a 'signal' or 'exception' stereotype.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic