[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
try -catch messing
From: |
John W. Eaton |
Subject: |
try -catch messing |
Date: |
Fri, 30 Nov 2007 11:52:43 -0500 |
On 29-Nov-2007, depuis wrote:
| 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.
I can't duplicate whatever problem it is that you are having given the
information above.
If you think you've found a bug in Octave, please send a *complete*
bug report to the address@hidden list. Please read
http://www.octave.org/bugs.html to see what to include in a report so
that someone might actually be able to reproduce and fix the problem.
jwe