HI, I recently was reverse engineering a certain project to UML, and was stuck at a point where I could not reach a conclusion. The code is fairly simple:
...
try
{
sj = SendingJob.DeserializeXmlString("....");
trcSrc.TraceInfo("....");
}
catch (FormatException)
{
trcSrc.TraceError("....");
return "00 - Job Content Bad Format.";
} ...
Firts off I modeled the code as such:
But after reading the following text:
"If an exception occurs while an action is executing, the execution is abandoned and there is no output from the action. If the action has an exception handler, the handler is executed with the exception information. When the exception handler executes, its output is available to the next action after the protected node, as though the protected node had finished execution."
... but the thing is my exception handler exits the catch block by returning a value, and stopping the activity. I tried to link the exception node to an activity final node, but my tool refuses to do it, and which I'm pretty sure is not the correct way to do it.
So my question is: How to model an activity diagram where an action throws an exception and its handler terminates the activity?