<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Q about modeling Java try/catch/finally"]]></title>
		<link>http://forums.visual-paradigm.com/posts/1.html</link>
		<description><![CDATA[Latest messages posted in the topic "Q about modeling Java try/catch/finally"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Q about modeling Java try/catch/finally</title>
				<description><![CDATA[ Hi all,<br> <br> I'm trying to figure out how to handle something like this:<br> <br> <table class="code-table-simple" align="center">
		<tr> 
		<td><span class="genmed"><b>Code:</b></span></td>
		</tr>
		</table>
		<table class="code-table" align="center">
		<tr>
		<td class="code">
		<pre>
 try
 {
   block A
 }
 catch &#40;Exception E&#41;
 {
   block B
   return
 }
 finally
 {
   block C
 }
 
 block D
  </pre></td>
		</tr>
		</table> <br> <br> I know that the UML 2.1 spec says that "the successors of an exception handler body are the same as the successors to the protected node". The protected node here is inside the try clause, and the exception handler is inside the catch clause. So that would be great if the exception handler didn't return or throw another exception.<br> <br> The problem is, how to model the fact that the finally clause (block C) gets executed after block B, but then the flow is ended by virtue of the end of flow in the exception handler?<br> <br> Thanks,<br> <br> --Rob]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/3060#31085.html</guid>
				<link>http://forums.visual-paradigm.com/posts/3060#31085.html</link>
				<pubDate><![CDATA[Wed, 23 Apr 2008 04:45:34]]></pubDate>
				<author><![CDATA[ Robert B]]></author>
			</item>
			<item>
				<title>Re:Q about modeling Java try/catch/finally</title>
				<description><![CDATA[ Hi Rob,<br> <br> Thanks for your post. You can refer to Figure 12.81 (the image attached) in Section 12.3.23 in UML 2.1 specification, we can take "Print Results" as the "final" clause in this example.<br> <br> In your case, you can take "block C" similar to the role of "Print Results", and "block D" is something following "block C".<br> <br> If there are any further inquiries, please feel free to ask.<br> <br> Best regards,<br> Lilian Wong]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/3060#31157.html</guid>
				<link>http://forums.visual-paradigm.com/posts/3060#31157.html</link>
				<pubDate><![CDATA[Wed, 23 Apr 2008 13:53:15]]></pubDate>
				<author><![CDATA[ LilianWong]]></author>
			</item>
			<item>
				<title>Re:Q about modeling Java try/catch/finally</title>
				<description><![CDATA[ Hi,<br> <br> That diagram looks familiar, because I had already stared at it for at least an hour :) <br> <br> My problem is, if block D is something that simply comes after block C, then what is to stop someone from thinking that if an exception happens, the exception handler runs, then block C.... and then block D, because the diagram shows the flow going from block C to block D.<br> <br> My problem is that the UML spec says specifically "the successorS of the protected node" -- plural.<br> <br> Any ideas?<br> <br> Thanks,<br> <br> --Rob]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/3060#31187.html</guid>
				<link>http://forums.visual-paradigm.com/posts/3060#31187.html</link>
				<pubDate><![CDATA[Wed, 23 Apr 2008 20:57:51]]></pubDate>
				<author><![CDATA[ Robert B]]></author>
			</item>
			<item>
				<title>Q about modeling Java try/catch/finally</title>
				<description><![CDATA[ Hello Robert B,<br> <br> Thanks for replying. As UML is not specific design for modeling specific programming language, I think we can tread it as a common understanding that the flow will be going to Block C and then back to Block B for the return statement, and skip the Block D when exception found. <br> <br> Hope this can answer your question. <br> <br> Best regards,<br> Rain Wong]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/3060#31316.html</guid>
				<link>http://forums.visual-paradigm.com/posts/3060#31316.html</link>
				<pubDate><![CDATA[Thu, 24 Apr 2008 11:35:50]]></pubDate>
				<author><![CDATA[ Rain]]></author>
			</item>
	</channel>
</rss>