check [Solved] How to model exceptions in sequence diagrams

2 months 4 weeks ago - 2 months 3 weeks ago #5272 by Ralf Ebert
Hi,

Is the any way known how I can describe the handling of caught exceptions within a sequence diagram, e.g. using combined fragments?

Best regards
Ralf Ebert

Please Log in or Create an account to join the conversation.

2 months 3 weeks ago #5274 by ebr
Hi,

I am not sure that UML provides a specific way to describe exception catching using Sequence diagram (Activity diagram provides one...).

By googling "handling exception sequence diagram", I found different ways of modelling that but the one which looks clear for me.
For example, if you want to model the following code:
public void process(){
B myB= new B();
try{
myB.op(-9);
}
catch(ExA e){
e.printStackTrace();
}
}

The correponding sequence diagram would be:

Attachments:
The following user(s) said Thank You: Ralf Ebert, cononda

Please Log in or Create an account to join the conversation.

2 months 3 weeks ago #5276 by Ralf Ebert
Hi ebr,

Thank you for your suggestion. I think it fits to my needs.

Best regards
Ralf Ebert

Please Log in or Create an account to join the conversation.

Moderators: tmaebr
Time to create page: 0.161 seconds
^ Back to Top