Mercurial > hg > octave-lyh
comparison src/utils.cc @ 10066:2cd940306a06
make unwind_protect frames local
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 13:18:41 +0100 |
parents | f349847c4541 |
children | 897e62651c0a |
comparison
equal
deleted
inserted
replaced
10065:64a06079cae4 | 10066:2cd940306a06 |
---|---|
1366 else if (nargin != 1) | 1366 else if (nargin != 1) |
1367 print_usage (); | 1367 print_usage (); |
1368 | 1368 |
1369 if (! error_state) | 1369 if (! error_state) |
1370 { | 1370 { |
1371 unwind_protect::frame_id_t uwp = unwind_protect::begin_frame (); | 1371 unwind_protect frame; |
1372 unwind_protect::protect_var (error_state); | 1372 frame.protect_var (error_state); |
1373 unwind_protect::protect_var (discard_error_messages); | 1373 frame.protect_var (discard_error_messages); |
1374 discard_error_messages = true; | 1374 discard_error_messages = true; |
1375 | 1375 |
1376 try | 1376 try |
1377 { | 1377 { |
1378 idx_vector idx = args(0).index_vector (); | 1378 idx_vector idx = args(0).index_vector (); |
1388 } | 1388 } |
1389 catch (octave_execution_exception) | 1389 catch (octave_execution_exception) |
1390 { | 1390 { |
1391 retval = false; | 1391 retval = false; |
1392 } | 1392 } |
1393 | |
1394 unwind_protect::run_frame (uwp); | |
1395 } | 1393 } |
1396 | 1394 |
1397 return retval; | 1395 return retval; |
1398 } | 1396 } |
1399 | 1397 |