• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Modeling the exception in interaction diagrams

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:
how do we model exception handling in interaction diagram? or is it just similar to modeling a condition?
thank you,
-aao
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
regards,
paul.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic