help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

try -catch messing


From: depuis
Subject: try -catch messing
Date: Thu, 29 Nov 2007 15:51:38 +0100

Hello,

I have a loop to analyse data, and something it can get wrong. I detect it in
a try-catch construct:

for indi=1:10
  %# analyse data
 try
  %# the following statement fails if analysis is not successfull
  resu(indi) = some_val;
 catch
  disp('something wrong with system order '); 
    keyboard
 end_try_catch
endfor

I 'discovered' that typing 'continue' during the keyboard wait is a very bad
idea:) It seems that escaping abruptly the catch part interferes badly with
the exception handling. F.i., after that, functions as 'strcat' stopped
working, as they use also an exception handler.
Is it or not the intended behaviour ? Can it be documented: "Thou shall not
escape exception handler ! "
The fix is to set some boolean var inside the catch block, and loop afterwards.

Best regards

Pascal
---
Scarlet One, ADSL 6 Mbps + Telephone, from EUR 29,95...
http://www.scarlet.be/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]