Mercurial > octave
diff src/octave.cc @ 7481:78f3811155f7
use exceptions in liboctave error handler
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 14 Feb 2008 17:14:23 -0500 |
parents | 745a8299c2b5 |
children | 5b4d278ec828 |
line wrap: on
line diff
--- a/src/octave.cc Wed Feb 13 00:00:33 2008 -0500 +++ b/src/octave.cc Thu Feb 14 17:14:23 2008 -0500 @@ -525,9 +525,20 @@ } static void +lo_error_handler (const char *fmt, ...) +{ + va_list args; + va_start (args, fmt); + verror (fmt, args); + va_end (args); + + octave_throw_execution_exception (); +} + +static void initialize_error_handlers () { - set_liboctave_error_handler (error); + set_liboctave_error_handler (lo_error_handler); set_liboctave_warning_handler (warning); set_liboctave_warning_with_id_handler (warning_with_id); }