
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>RE: try - catch</title>
<link>http://www.equalis.com/forums/posts.asp?topic=403550</link>
<description></description>
<lastBuildDate>Wed, 19 Jun 2013 08:51:47 GMT</lastBuildDate>
<pubDate>Fri, 13 Apr 2012 11:34:06 GMT</pubDate>
<copyright>Copyright &#xA9; 2012 Equalis - Where Engineering and Science Computes</copyright>
<atom:link href="http://www.equalis.com/forums/topic_rss.asp?id=403550" rel="self" type="application/rss+xml"></atom:link>
<item>
<title>RE: try - catch</title>
<link>http://www.equalis.com/forums/posts.asp?topic=403550</link>
<guid>http://www.equalis.com/forums/posts.asp?topic=403550</guid>
<description><![CDATA[<div class="ForumQuote"><span style="font-weight: bold;">F. Blanchard said:</span><br><p>Hi.</p><p>&nbsp;</p><p>I am trying to use try-catch function but when an error occurs the code between catch and end is not calculated.</p><p>So i tried to put on the errcatch function wihtout results.</p><p>Can anyone explain me why ?</p><p>&nbsp;Here is tcode : </p><p>&nbsp;errcatch(-1,"continue");<br><br>try<br> data=fscanfMat('MESURE-FB.TMP');<br> choix=data(data(:,1)==NumPiece,:);<br> catch<br> choix=[NumPiece,-1000,-1000];<br>end<br><br>errcatch(-1);</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>Thank you.</p><p>&nbsp;</p><p>Fr&eacute;d&eacute;ric</p><p></p></div><p>&nbsp;</p><p>Hi.</p><p>You cannot use <span style="color: rgb(255, 0, 0);">errcatch</span> with <span style="color: rgb(255, 0, 0);">try..catch</span>. </p><p>I usually use <span style="color: rgb(255, 0, 0);">pause</span> for debugging.</p><p>To see what is wrong try:</p><p></p>try<br>&nbsp;&nbsp; data=fscanfMat('MESURE-FB.TMP');<br>&nbsp;&nbsp; choix=data(data(:,1)==NumPiece,:);<br>catch<br>&nbsp;&nbsp;&nbsp; pause<br>&nbsp;&nbsp;&nbsp; choix=[NumPiece,-1000,-1000];<br>end<br><br>Stanislav<br>]]></description>
<pubDate>Fri, 13 Apr 2012 12:34:06 GMT</pubDate>
</item>
</channel>
</rss>
