Mercurial > octave
diff libinterp/octave-value/cdef-object.cc @ 27160:6b0c61a5a0f0
move global error configuration and status variables inside a class
* error.h, error.cc (error_system): New class.
(Vbacktrace_on_warning, Vbeep_on_error, Vdebug_on_caught,
Vdebug_on_error, Vdebug_on_warning, Vlast_error_id,
Vlast_error_message, Vlast_error_stack, Vlast_warning_id,
Vlast_warning_message, Vquiet_warning, Vverbose_warning,
buffer_error_messages, discard_error_messages,
discard_warning_messages, in_try_catch, warning_options):
Move global and file-scope static variables inside error_system class.
Change all uses.
* interpreter.h, interpreter.cc (m_error_system): New member variable.
(get_error_system): New function.
* interpreter-private.h, interpreter-private.cc
(__get_error_system__): New function.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 31 May 2019 15:49:38 +0000 |
parents | 64461ccf3039 |
children | 823b4bcf79fc |
line wrap: on
line diff
--- a/libinterp/octave-value/cdef-object.cc Fri Jun 07 13:29:41 2019 -0400 +++ b/libinterp/octave-value/cdef-object.cc Fri May 31 15:49:38 2019 +0000 @@ -29,6 +29,7 @@ #include "cdef-property.h" #include "cdef-utils.h" #include "interpreter.h" +#include "interpreter-private.h" #include "ov-classdef.h" // Define to 1 to enable debugging statements. @@ -79,7 +80,11 @@ } catch (const execution_exception&) { - std::string msg = last_error_message (); + octave::error_system& es + = octave::__get_error_system__ ("cdef_object::release"); + + std::string msg = es.last_error_message (); + warning ("error caught while executing handle class delete method:\n%s\n", msg.c_str ());