Mercurial > hg > octave-lyh
comparison src/ov-fcn-handle.cc @ 11029:4ab04ea74b08
make an internal function for try simulation
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 28 Sep 2010 09:08:29 +0200 |
parents | 2cc9b08bfd39 |
children | 54697b37d8bf |
comparison
equal
deleted
inserted
replaced
11028:7d0d28aff7a9 | 11029:4ab04ea74b08 |
---|---|
1877 if (symbol_table::get_dispatch (head_name).size () > 0) | 1877 if (symbol_table::get_dispatch (head_name).size () > 0) |
1878 bad = true; | 1878 bad = true; |
1879 else | 1879 else |
1880 { | 1880 { |
1881 // Simulate try/catch. | 1881 // Simulate try/catch. |
1882 // FIXME: there should be a method for that. | |
1883 unwind_protect frame; | 1882 unwind_protect frame; |
1884 | 1883 interpreter_try (frame); |
1885 frame.protect_var (error_state); | |
1886 frame.protect_var (buffer_error_messages); | |
1887 frame.protect_var (Vdebug_on_error); | |
1888 frame.protect_var (Vdebug_on_warning); | |
1889 | |
1890 buffer_error_messages++; | |
1891 Vdebug_on_error = false; | |
1892 Vdebug_on_warning = false; | |
1893 | 1884 |
1894 root_val = make_fcn_handle (head_name); | 1885 root_val = make_fcn_handle (head_name); |
1895 if (error_state) | 1886 if (error_state) |
1896 bad = true; | 1887 bad = true; |
1897 } | 1888 } |