Mercurial > octave
annotate libinterp/corefcn/error.h @ 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 | 7ff128cf978e |
children | 7883e6e71b0a |
rev | line source |
---|---|
1 | 1 /* |
2 | |
26376
00f796120a6d
maint: Update copyright dates in all source files.
John W. Eaton <jwe@octave.org>
parents:
26164
diff
changeset
|
3 Copyright (C) 1993-2019 John W. Eaton |
1 | 4 |
5 This file is part of Octave. | |
6 | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23615
diff
changeset
|
7 Octave is free software: you can redistribute it and/or modify it |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
8 under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23615
diff
changeset
|
9 the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
10 (at your option) any later version. |
1 | 11 |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
12 Octave is distributed in the hope that it will be useful, but |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
13 WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
15 GNU General Public License for more details. |
1 | 16 |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23615
diff
changeset
|
19 <https://www.gnu.org/licenses/>. |
1 | 20 |
21 */ | |
22 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
20785
diff
changeset
|
23 #if ! defined (octave_error_h) |
383 | 24 #define octave_error_h 1 |
1 | 25 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21157
diff
changeset
|
26 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21157
diff
changeset
|
27 |
6355 | 28 #include <cstdarg> |
26164
7f6a50f73625
Silence compiler warnings about format identifier for octave_idx_type (bug #55046).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26147
diff
changeset
|
29 #include <cinttypes> |
3935 | 30 #include <string> |
1489 | 31 |
21743
f4d7d0eb5b0c
use namespace for unwind_protect class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
32 #include "unwind-prot.h" |
f4d7d0eb5b0c
use namespace for unwind_protect class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
33 |
27160
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
34 #include "oct-map.h" |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
35 |
10605
1834132fb50b
allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
36 class octave_value_list; |
22327
d0562b3159c7
move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
37 namespace octave |
d0562b3159c7
move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
38 { |
d0562b3159c7
move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
39 class execution_exception; |
d0562b3159c7
move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
40 } |
10605
1834132fb50b
allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
41 |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21743
diff
changeset
|
42 #define panic_impossible() \ |
19861
19755f4fc851
maint: Cleanup C++ code to follow Octave coding conventions.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
43 panic ("impossible state reached in file '%s' at line %d", __FILE__, __LINE__) |
1 | 44 |
27160
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
45 OCTAVE_DEPRECATED (6, "use 'error_system::reset' instead") |
6109 | 46 extern OCTINTERP_API void reset_error_handler (void); |
4318 | 47 |
6109 | 48 extern OCTINTERP_API int warning_enabled (const std::string& id); |
5781 | 49 |
23464
7eb0077e86f0
show stack trace for wrong type arg errors (bug #50894)
John W. Eaton <jwe@octave.org>
parents:
23219
diff
changeset
|
50 extern OCTINTERP_API octave::execution_exception |
7eb0077e86f0
show stack trace for wrong type arg errors (bug #50894)
John W. Eaton <jwe@octave.org>
parents:
23219
diff
changeset
|
51 make_execution_exception (const char *who); |
7eb0077e86f0
show stack trace for wrong type arg errors (bug #50894)
John W. Eaton <jwe@octave.org>
parents:
23219
diff
changeset
|
52 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
53 extern OCTINTERP_API void |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
54 vmessage (const char *name, const char *fmt, va_list args); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
55 |
26164
7f6a50f73625
Silence compiler warnings about format identifier for octave_idx_type (bug #55046).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26147
diff
changeset
|
56 OCTAVE_FORMAT_PRINTF (2, 3) |
6109 | 57 extern OCTINTERP_API void message (const char *name, const char *fmt, ...); |
6338 | 58 |
59 extern OCTINTERP_API void vwarning (const char *fmt, va_list args); | |
26164
7f6a50f73625
Silence compiler warnings about format identifier for octave_idx_type (bug #55046).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26147
diff
changeset
|
60 OCTAVE_FORMAT_PRINTF (1, 2) |
6109 | 61 extern OCTINTERP_API void warning (const char *fmt, ...); |
6338 | 62 |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
63 OCTAVE_NORETURN OCTINTERP_API extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
64 void verror (const char *fmt, va_list args); |
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
65 |
26164
7f6a50f73625
Silence compiler warnings about format identifier for octave_idx_type (bug #55046).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26147
diff
changeset
|
66 OCTAVE_FORMAT_PRINTF (1, 2) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
67 OCTAVE_NORETURN OCTINTERP_API extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
68 void error (const char *fmt, ...); |
6338 | 69 |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
70 OCTAVE_NORETURN OCTINTERP_API extern |
22327
d0562b3159c7
move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
71 void verror (octave::execution_exception&, const char *fmt, va_list args); |
26147
216d857732eb
Add static compile-time checking of printf functions (bug #55046).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
26146
diff
changeset
|
72 |
26164
7f6a50f73625
Silence compiler warnings about format identifier for octave_idx_type (bug #55046).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26147
diff
changeset
|
73 OCTAVE_FORMAT_PRINTF (2, 3) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
74 OCTAVE_NORETURN OCTINTERP_API extern |
22327
d0562b3159c7
move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
75 void error (octave::execution_exception&, const char *fmt, ...); |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
19861
diff
changeset
|
76 |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
77 OCTAVE_NORETURN OCTINTERP_API extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
78 void verror_with_cfn (const char *fmt, va_list args); |
26147
216d857732eb
Add static compile-time checking of printf functions (bug #55046).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
26146
diff
changeset
|
79 |
26164
7f6a50f73625
Silence compiler warnings about format identifier for octave_idx_type (bug #55046).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26147
diff
changeset
|
80 OCTAVE_FORMAT_PRINTF (1, 2) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
81 OCTAVE_NORETURN OCTINTERP_API extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
82 void error_with_cfn (const char *fmt, ...); |
9753
892e2aa7bc75
improve error messages by auto-prepending current function name
Jaroslav Hajek <highegg@gmail.com>
parents:
7977
diff
changeset
|
83 |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
84 OCTAVE_NORETURN OCTINTERP_API extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
85 void vparse_error (const char *fmt, va_list args); |
26147
216d857732eb
Add static compile-time checking of printf functions (bug #55046).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
26146
diff
changeset
|
86 |
26164
7f6a50f73625
Silence compiler warnings about format identifier for octave_idx_type (bug #55046).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26147
diff
changeset
|
87 OCTAVE_FORMAT_PRINTF (1, 2) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
88 OCTAVE_NORETURN OCTINTERP_API extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
89 void parse_error (const char *fmt, ...); |
5567 | 90 |
6109 | 91 extern OCTINTERP_API void |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
92 vmessage_with_id (const char *id, const char *name, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
93 const char *fmt, va_list args); |
6338 | 94 |
26164
7f6a50f73625
Silence compiler warnings about format identifier for octave_idx_type (bug #55046).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26147
diff
changeset
|
95 OCTAVE_FORMAT_PRINTF (3, 4) |
6338 | 96 extern OCTINTERP_API void |
5567 | 97 message_with_id (const char *id, const char *name, const char *fmt, ...); |
98 | |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
99 OCTAVE_NORETURN OCTINTERP_API extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
100 void vusage_with_id (const char *id, const char *fmt, va_list args); |
6338 | 101 |
26164
7f6a50f73625
Silence compiler warnings about format identifier for octave_idx_type (bug #55046).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26147
diff
changeset
|
102 OCTAVE_FORMAT_PRINTF (2, 3) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
103 OCTAVE_NORETURN OCTINTERP_API extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
104 void usage_with_id (const char *id, const char *fmt, ...); |
5567 | 105 |
6109 | 106 extern OCTINTERP_API void |
6338 | 107 vwarning_with_id (const char *id, const char *fmt, va_list args); |
108 | |
26164
7f6a50f73625
Silence compiler warnings about format identifier for octave_idx_type (bug #55046).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26147
diff
changeset
|
109 OCTAVE_FORMAT_PRINTF (2, 3) |
6338 | 110 extern OCTINTERP_API void |
5567 | 111 warning_with_id (const char *id, const char *fmt, ...); |
112 | |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
113 OCTAVE_NORETURN OCTINTERP_API extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
114 void verror_with_id (const char *id, const char *fmt, va_list args); |
6338 | 115 |
26164
7f6a50f73625
Silence compiler warnings about format identifier for octave_idx_type (bug #55046).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26147
diff
changeset
|
116 OCTAVE_FORMAT_PRINTF (2, 3) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
117 OCTAVE_NORETURN OCTINTERP_API extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
118 void error_with_id (const char *id, const char *fmt, ...); |
5567 | 119 |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
120 OCTAVE_NORETURN OCTINTERP_API extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
121 void verror_with_id_cfn (const char *id, const char *fmt, va_list args); |
9753
892e2aa7bc75
improve error messages by auto-prepending current function name
Jaroslav Hajek <highegg@gmail.com>
parents:
7977
diff
changeset
|
122 |
26164
7f6a50f73625
Silence compiler warnings about format identifier for octave_idx_type (bug #55046).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26147
diff
changeset
|
123 OCTAVE_FORMAT_PRINTF (2, 3) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
124 OCTAVE_NORETURN OCTINTERP_API extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
125 void error_with_id_cfn (const char *id, const char *fmt, ...); |
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
126 |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
127 OCTAVE_NORETURN OCTINTERP_API extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
128 void vparse_error_with_id (const char *id, const char *fmt, va_list args); |
9753
892e2aa7bc75
improve error messages by auto-prepending current function name
Jaroslav Hajek <highegg@gmail.com>
parents:
7977
diff
changeset
|
129 |
26164
7f6a50f73625
Silence compiler warnings about format identifier for octave_idx_type (bug #55046).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26147
diff
changeset
|
130 OCTAVE_FORMAT_PRINTF (2, 3) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
131 OCTAVE_NORETURN OCTINTERP_API extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
132 void parse_error_with_id (const char *id, const char *fmt, ...); |
6338 | 133 |
26164
7f6a50f73625
Silence compiler warnings about format identifier for octave_idx_type (bug #55046).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26147
diff
changeset
|
134 OCTAVE_FORMAT_PRINTF (1, 2) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
135 OCTAVE_NORETURN OCTINTERP_API extern |
21029
e3b3bb522d62
maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
136 void panic (const char *fmt, ...); |
1 | 137 |
26146
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
138 //! Helper function for print_usage defined in defun.cc. |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
139 |
6109 | 140 extern OCTINTERP_API void defun_usage_message (const std::string& msg); |
4732 | 141 |
10605
1834132fb50b
allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
142 extern OCTINTERP_API octave_value_list |
1834132fb50b
allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
143 set_warning_state (const std::string& id, const std::string& state); |
1834132fb50b
allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
144 |
1834132fb50b
allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
145 extern OCTINTERP_API octave_value_list |
1834132fb50b
allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
146 set_warning_state (const octave_value_list& args); |
1834132fb50b
allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
147 |
6109 | 148 extern OCTINTERP_API void disable_warning (const std::string& id); |
149 extern OCTINTERP_API void initialize_default_warning_state (void); | |
5794 | 150 |
27129
7ff128cf978e
mark global error_state variable as deprecated
John W. Eaton <jwe@octave.org>
parents:
27128
diff
changeset
|
151 OCTAVE_DEPRECATED (6, "this variable is obsolete and always has the value 0") |
6109 | 152 extern OCTINTERP_API int error_state; |
143 | 153 |
21743
f4d7d0eb5b0c
use namespace for unwind_protect class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
154 extern OCTINTERP_API void interpreter_try (octave::unwind_protect&); |
11029
4ab04ea74b08
make an internal function for try simulation
Jaroslav Hajek <highegg@gmail.com>
parents:
10605
diff
changeset
|
155 |
27160
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
156 namespace octave |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
157 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
158 class error_system |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
159 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
160 public: |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
161 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
162 error_system (interpreter& interp); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
163 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
164 error_system (const error_system&) = delete; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
165 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
166 error_system& operator = (const error_system&) = delete; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
167 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
168 ~error_system (void) = default; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
169 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
170 void reset (void) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
171 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
172 m_buffer_error_messages = 0; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
173 m_in_try_catch = 0; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
174 m_discard_error_messages = false; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
175 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
176 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
177 octave_value debug_on_error (const octave_value_list& args, int nargout); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
178 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
179 void set_debug_on_error (bool flag) { m_debug_on_error = flag; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
180 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
181 bool debug_on_error (void) const { return m_debug_on_error; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
182 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
183 bool debug_on_error (bool flag) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
184 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
185 bool val = m_debug_on_error; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
186 m_debug_on_error = flag; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
187 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
188 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
189 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
190 octave_value debug_on_caught (const octave_value_list& args, int nargout); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
191 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
192 void set_debug_on_caught (bool flag) { m_debug_on_caught = flag; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
193 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
194 bool debug_on_caught (void) const { return m_debug_on_caught; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
195 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
196 bool debug_on_caught (bool flag) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
197 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
198 bool val = m_debug_on_caught; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
199 m_debug_on_caught = flag; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
200 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
201 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
202 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
203 octave_value debug_on_warning (const octave_value_list& args, int nargout); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
204 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
205 void set_debug_on_warning (bool flag) { m_debug_on_warning = flag; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
206 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
207 bool debug_on_warning (void) const { return m_debug_on_warning; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
208 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
209 bool debug_on_warning (bool flag) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
210 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
211 bool val = m_debug_on_warning; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
212 m_debug_on_warning = flag; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
213 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
214 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
215 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
216 octave_value buffer_error_messages (const octave_value_list& args, int nargout); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
217 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
218 void set_buffer_error_messages (int val) { m_buffer_error_messages = val; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
219 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
220 int buffer_error_messages (void) const { return m_buffer_error_messages; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
221 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
222 int buffer_error_messages (int new_val) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
223 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
224 int val = m_buffer_error_messages; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
225 m_buffer_error_messages = new_val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
226 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
227 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
228 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
229 octave_value in_try_catch (const octave_value_list& args, int nargout); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
230 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
231 void set_in_try_catch (int val) { m_in_try_catch = val; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
232 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
233 int in_try_catch (void) const { return m_in_try_catch; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
234 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
235 int in_try_catch (int new_val) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
236 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
237 int val = m_in_try_catch; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
238 m_in_try_catch = new_val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
239 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
240 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
241 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
242 octave_value discard_error_messages (const octave_value_list& args, int nargout); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
243 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
244 void set_discard_error_messages (bool flag) { m_discard_error_messages = flag; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
245 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
246 bool discard_error_messages (void) const { return m_discard_error_messages; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
247 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
248 bool discard_error_messages (bool flag) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
249 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
250 bool val = m_discard_error_messages; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
251 m_discard_error_messages = flag; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
252 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
253 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
254 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
255 octave_value discard_warning_messages (const octave_value_list& args, int nargout); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
256 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
257 void set_discard_warning_messages (bool flag) { m_discard_warning_messages = flag; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
258 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
259 bool discard_warning_messages (void) const { return m_discard_warning_messages; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
260 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
261 bool discard_warning_messages (bool flag) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
262 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
263 bool val = m_discard_warning_messages; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
264 m_discard_warning_messages = flag; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
265 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
266 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
267 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
268 octave_value beep_on_error (const octave_value_list& args, int nargout); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
269 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
270 void set_beep_on_error (bool flag) { m_beep_on_error = flag; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
271 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
272 bool beep_on_error (void) const { return m_beep_on_error; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
273 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
274 bool beep_on_error (bool flag) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
275 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
276 bool val = m_beep_on_error; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
277 m_beep_on_error = flag; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
278 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
279 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
280 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
281 octave_value backtrace_on_warning (const octave_value_list& args, int nargout); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
282 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
283 void set_backtrace_on_warning (bool flag) { m_backtrace_on_warning = flag; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
284 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
285 bool backtrace_on_warning (void) const { return m_backtrace_on_warning; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
286 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
287 bool backtrace_on_warning (bool flag) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
288 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
289 bool val = m_backtrace_on_warning; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
290 m_backtrace_on_warning = flag; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
291 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
292 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
293 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
294 octave_value verbose_warning (const octave_value_list& args, int nargout); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
295 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
296 void set_verbose_warning (bool flag) { m_verbose_warning = flag; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
297 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
298 bool verbose_warning (void) const { return m_verbose_warning; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
299 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
300 bool verbose_warning (bool flag) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
301 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
302 bool val = m_verbose_warning; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
303 m_verbose_warning = flag; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
304 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
305 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
306 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
307 octave_value quiet_warning (const octave_value_list& args, int nargout); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
308 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
309 void set_quiet_warning (bool flag) { m_quiet_warning = flag; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
310 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
311 bool quiet_warning (void) const { return m_quiet_warning; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
312 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
313 bool quiet_warning (bool flag) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
314 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
315 bool val = m_quiet_warning; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
316 m_quiet_warning = flag; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
317 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
318 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
319 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
320 octave_map warning_options (void) const { return m_warning_options; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
321 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
322 void set_warning_options (const octave_map& val) { m_warning_options = val; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
323 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
324 octave_map warning_options (const octave_map& new_val) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
325 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
326 octave_map val = m_warning_options; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
327 m_warning_options = new_val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
328 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
329 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
330 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
331 octave_value last_error_message (const octave_value_list& args, int nargout); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
332 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
333 void set_last_error_message (const std::string& val) { m_last_error_message = val; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
334 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
335 std::string last_error_message (void) const { return m_last_error_message; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
336 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
337 std::string last_error_message (const std::string& s) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
338 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
339 std::string val = m_last_error_message; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
340 m_last_error_message = s; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
341 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
342 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
343 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
344 octave_value last_warning_message (const octave_value_list& args, int nargout); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
345 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
346 void set_last_warning_message (const std::string& val) { m_last_warning_message = val; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
347 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
348 std::string last_warning_message (void) const { return m_last_warning_message; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
349 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
350 std::string last_warning_message (const std::string& s) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
351 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
352 std::string val = m_last_warning_message; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
353 m_last_warning_message = s; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
354 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
355 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
356 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
357 octave_value last_warning_id (const octave_value_list& args, int nargout); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
358 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
359 void set_last_warning_id (const std::string& val) { m_last_warning_id = val; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
360 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
361 std::string last_warning_id (void) const { return m_last_warning_id; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
362 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
363 std::string last_warning_id (const std::string& s) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
364 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
365 std::string val = m_last_warning_id; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
366 m_last_warning_id = s; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
367 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
368 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
369 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
370 octave_value last_error_id (const octave_value_list& args, int nargout); |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
371 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
372 void set_last_error_id (const std::string& val) { m_last_error_id = val; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
373 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
374 std::string last_error_id (void) const { return m_last_error_id; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
375 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
376 std::string last_error_id (const std::string& s) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
377 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
378 std::string val = m_last_error_id; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
379 m_last_error_id = s; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
380 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
381 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
382 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
383 void set_last_error_stack (const octave_map& val) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
384 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
385 m_last_error_stack = val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
386 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
387 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
388 octave_map last_error_stack (void) const { return m_last_error_stack; } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
389 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
390 octave_map last_error_stack (const octave_map& new_val) |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
391 { |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
392 octave_map val = m_last_error_stack; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
393 m_last_error_stack = new_val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
394 return val; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
395 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
396 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
397 private: |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
398 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
399 interpreter& m_interpreter; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
400 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
401 //! TRUE means that Octave will try to enter the debugger when an error |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
402 //! is encountered. This will also inhibit printing of the normal |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
403 //! traceback message (you will only see the top-level error message). |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
404 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
405 bool m_debug_on_error; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
406 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
407 //! TRUE means that Octave will try to enter the debugger when an error |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
408 //! is encountered within the 'try' section of a 'try' / 'catch' block. |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
409 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
410 bool m_debug_on_caught; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
411 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
412 //! TRUE means that Octave will try to enter the debugger when a warning |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
413 //! is encountered. |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
414 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
415 bool m_debug_on_warning; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
416 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
417 //! Tell the error handler whether to print messages, or just store |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
418 //! them for later. Used for handling errors in eval() and |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
419 //! the 'unwind_protect' statement. |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
420 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
421 int m_buffer_error_messages; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
422 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
423 //! The number of layers of try / catch blocks we're in. Used to print |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
424 //! "caught error" instead of "error" when "dbstop if caught error" is on. |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
425 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
426 int m_in_try_catch; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
427 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
428 //! TRUE means error messages are turned off. |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
429 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
430 bool m_discard_error_messages; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
431 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
432 //! TRUE means warning messages are turned off. |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
433 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
434 bool m_discard_warning_messages; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
435 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
436 //! TRUE means that Octave will try to beep obnoxiously before |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
437 //! printing error messages. |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
438 bool m_beep_on_error; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
439 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
440 //! TRUE means that Octave will try to display a stack trace when a |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
441 //! warning is encountered. |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
442 bool m_backtrace_on_warning; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
443 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
444 //! TRUE means that Octave will print a verbose warning. Currently |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
445 //! unused. |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
446 bool m_verbose_warning; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
447 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
448 //! TRUE means that Octave will print no warnings, but lastwarn will |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
449 //! be updated |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
450 bool m_quiet_warning; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
451 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
452 //! A structure containing (most of) the current state of warnings. |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
453 octave_map m_warning_options; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
454 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
455 //! The text of the last error message. |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
456 std::string m_last_error_message; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
457 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
458 //! The text of the last warning message. |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
459 std::string m_last_warning_message; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
460 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
461 //! The last warning message id. |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
462 std::string m_last_warning_id; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
463 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
464 //! The last error message id. |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
465 std::string m_last_error_id; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
466 |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
467 //! The last file in which an error occurred. |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
468 octave_map m_last_error_stack; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
469 }; |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
470 } |
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27129
diff
changeset
|
471 |
1 | 472 #endif |