Mercurial > octave
annotate libinterp/corefcn/error.h @ 27129:7ff128cf978e
mark global error_state variable as deprecated
* error.h (error_state): Mark as deprecated. This variable has been
obsolete since Octave version 4.2.0 but was left declared and defined
so that existing code would not have to change. But by now, no one
should be relying on this variable for error handling.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 29 May 2019 22:45:42 +0000 |
parents | 50b795da64dc |
children | 6b0c61a5a0f0 |
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 |
18222
6ef8b920a7d6
include stack in exception variable (bug #41117)
Stefan Mahr <dac922@gmx.de>
parents:
17787
diff
changeset
|
34 class octave_map; |
10605
1834132fb50b
allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
35 class octave_value_list; |
22327
d0562b3159c7
move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
36 namespace octave |
d0562b3159c7
move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
37 { |
d0562b3159c7
move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
38 class execution_exception; |
d0562b3159c7
move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
39 } |
10605
1834132fb50b
allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
40 |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21743
diff
changeset
|
41 #define panic_impossible() \ |
19861
19755f4fc851
maint: Cleanup C++ code to follow Octave coding conventions.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
42 panic ("impossible state reached in file '%s' at line %d", __FILE__, __LINE__) |
1 | 43 |
6109 | 44 extern OCTINTERP_API void reset_error_handler (void); |
4318 | 45 |
6109 | 46 extern OCTINTERP_API int warning_enabled (const std::string& id); |
5781 | 47 |
23464
7eb0077e86f0
show stack trace for wrong type arg errors (bug #50894)
John W. Eaton <jwe@octave.org>
parents:
23219
diff
changeset
|
48 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
|
49 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
|
50 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
51 extern OCTINTERP_API void |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
52 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
|
53 |
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
|
54 OCTAVE_FORMAT_PRINTF (2, 3) |
6109 | 55 extern OCTINTERP_API void message (const char *name, const char *fmt, ...); |
6338 | 56 |
57 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
|
58 OCTAVE_FORMAT_PRINTF (1, 2) |
6109 | 59 extern OCTINTERP_API void warning (const char *fmt, ...); |
6338 | 60 |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
61 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
|
62 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
|
63 |
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
|
64 OCTAVE_FORMAT_PRINTF (1, 2) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
65 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
|
66 void error (const char *fmt, ...); |
6338 | 67 |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
68 OCTAVE_NORETURN OCTINTERP_API extern |
22327
d0562b3159c7
move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
69 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
|
70 |
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
|
71 OCTAVE_FORMAT_PRINTF (2, 3) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
72 OCTAVE_NORETURN OCTINTERP_API extern |
22327
d0562b3159c7
move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
73 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
|
74 |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
75 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
|
76 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
|
77 |
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
|
78 OCTAVE_FORMAT_PRINTF (1, 2) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
79 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
|
80 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
|
81 |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
82 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
|
83 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
|
84 |
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
|
85 OCTAVE_FORMAT_PRINTF (1, 2) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
86 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
|
87 void parse_error (const char *fmt, ...); |
5567 | 88 |
6109 | 89 extern OCTINTERP_API void |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
90 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
|
91 const char *fmt, va_list args); |
6338 | 92 |
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
|
93 OCTAVE_FORMAT_PRINTF (3, 4) |
6338 | 94 extern OCTINTERP_API void |
5567 | 95 message_with_id (const char *id, const char *name, const char *fmt, ...); |
96 | |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
97 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
|
98 void vusage_with_id (const char *id, const char *fmt, va_list args); |
6338 | 99 |
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
|
100 OCTAVE_FORMAT_PRINTF (2, 3) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
101 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
|
102 void usage_with_id (const char *id, const char *fmt, ...); |
5567 | 103 |
6109 | 104 extern OCTINTERP_API void |
6338 | 105 vwarning_with_id (const char *id, const char *fmt, va_list args); |
106 | |
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
|
107 OCTAVE_FORMAT_PRINTF (2, 3) |
6338 | 108 extern OCTINTERP_API void |
5567 | 109 warning_with_id (const char *id, const char *fmt, ...); |
110 | |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
111 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
|
112 void verror_with_id (const char *id, const char *fmt, va_list args); |
6338 | 113 |
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
|
114 OCTAVE_FORMAT_PRINTF (2, 3) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
115 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
|
116 void error_with_id (const char *id, const char *fmt, ...); |
5567 | 117 |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
118 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
|
119 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
|
120 |
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
|
121 OCTAVE_FORMAT_PRINTF (2, 3) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
122 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
|
123 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
|
124 |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
125 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
|
126 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
|
127 |
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
|
128 OCTAVE_FORMAT_PRINTF (2, 3) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
129 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
|
130 void parse_error_with_id (const char *id, const char *fmt, ...); |
6338 | 131 |
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
|
132 OCTAVE_FORMAT_PRINTF (1, 2) |
21040
3e7cfee5f786
maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents:
21029
diff
changeset
|
133 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
|
134 void panic (const char *fmt, ...); |
1 | 135 |
26146
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
136 //! 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
|
137 |
6109 | 138 extern OCTINTERP_API void defun_usage_message (const std::string& msg); |
4732 | 139 |
10605
1834132fb50b
allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
140 extern OCTINTERP_API octave_value_list |
1834132fb50b
allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
141 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
|
142 |
1834132fb50b
allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
143 extern OCTINTERP_API octave_value_list |
1834132fb50b
allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
144 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
|
145 |
6109 | 146 extern OCTINTERP_API void disable_warning (const std::string& id); |
147 extern OCTINTERP_API void initialize_default_warning_state (void); | |
5794 | 148 |
26146
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
149 //! TRUE means that Octave will try to enter the debugger when an error |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
150 //! is encountered. This will also inhibit printing of the normal |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
151 //! traceback message (you will only see the top-level error message). |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
152 |
7353 | 153 extern OCTINTERP_API bool Vdebug_on_error; |
154 | |
26146
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
155 //! TRUE means that Octave will try to enter the debugger when an error |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
156 //! is encountered within the 'try' section of a 'try' / 'catch' block. |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
157 |
21157
94fc5f13d51b
dbstop: conditional breakpoint, dbstop if caught error etc. (bug #46795)
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21134
diff
changeset
|
158 extern OCTINTERP_API bool Vdebug_on_caught; |
94fc5f13d51b
dbstop: conditional breakpoint, dbstop if caught error etc. (bug #46795)
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21134
diff
changeset
|
159 |
26146
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
160 //! TRUE means that Octave will try to enter the debugger when a warning |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
161 //! is encountered. |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
162 |
7353 | 163 extern OCTINTERP_API bool Vdebug_on_warning; |
164 | |
26146
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
165 //! Current error state. |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
166 |
27129
7ff128cf978e
mark global error_state variable as deprecated
John W. Eaton <jwe@octave.org>
parents:
27128
diff
changeset
|
167 OCTAVE_DEPRECATED (6, "this variable is obsolete and always has the value 0") |
6109 | 168 extern OCTINTERP_API int error_state; |
143 | 169 |
26146
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
170 //! Tell the error handler whether to print messages, or just store |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
171 //! them for later. Used for handling errors in eval() and |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
172 //! the 'unwind_protect' statement. |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
173 |
6109 | 174 extern OCTINTERP_API int buffer_error_messages; |
1489 | 175 |
26146
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
176 //! The number of layers of try / catch blocks we're in. Used to print |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
177 //! "caught error" instead of "error" when "dbstop if caught error" is on. |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
178 |
21157
94fc5f13d51b
dbstop: conditional breakpoint, dbstop if caught error etc. (bug #46795)
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21134
diff
changeset
|
179 extern OCTINTERP_API int in_try_catch; |
94fc5f13d51b
dbstop: conditional breakpoint, dbstop if caught error etc. (bug #46795)
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21134
diff
changeset
|
180 |
26146
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
181 //! TRUE means error messages are turned off. |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
182 |
6109 | 183 extern OCTINTERP_API bool discard_error_messages; |
3815 | 184 |
26146
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
185 //! TRUE means warning messages are turned off. |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
186 |
6109 | 187 extern OCTINTERP_API bool discard_warning_messages; |
4452 | 188 |
26146
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
189 //! Helper functions to pass last error and warning messages and ids. |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
190 //! @{ |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
191 |
7977
065c28e1c368
Modify Fcellfun to directly access the error message/id rather than use a call to Flasterr
David Bateman <dbateman@free.fr>
parents:
7353
diff
changeset
|
192 extern OCTINTERP_API std::string last_error_message (void); |
065c28e1c368
Modify Fcellfun to directly access the error message/id rather than use a call to Flasterr
David Bateman <dbateman@free.fr>
parents:
7353
diff
changeset
|
193 extern OCTINTERP_API std::string last_error_id (void); |
18222
6ef8b920a7d6
include stack in exception variable (bug #41117)
Stefan Mahr <dac922@gmx.de>
parents:
17787
diff
changeset
|
194 extern OCTINTERP_API octave_map last_error_stack (void); |
7977
065c28e1c368
Modify Fcellfun to directly access the error message/id rather than use a call to Flasterr
David Bateman <dbateman@free.fr>
parents:
7353
diff
changeset
|
195 extern OCTINTERP_API std::string last_warning_message (void); |
065c28e1c368
Modify Fcellfun to directly access the error message/id rather than use a call to Flasterr
David Bateman <dbateman@free.fr>
parents:
7353
diff
changeset
|
196 extern OCTINTERP_API std::string last_warning_id (void); |
065c28e1c368
Modify Fcellfun to directly access the error message/id rather than use a call to Flasterr
David Bateman <dbateman@free.fr>
parents:
7353
diff
changeset
|
197 |
26146
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
198 //! @} |
389d86d41cbf
doc: Add Doxygen documentation.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
25147
diff
changeset
|
199 |
21743
f4d7d0eb5b0c
use namespace for unwind_protect class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
200 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
|
201 |
1 | 202 #endif |