annotate libinterp/corefcn/error.h @ 30021:973142706c0f

* error.h (error_state): Declare unconditionally.
author John W. Eaton <jwe@octave.org>
date Fri, 20 Aug 2021 02:17:47 -0400
parents c44c72cc68a0
children 815fbbbccd0c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ////////////////////////////////////////////////////////////////////////
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 //
29358
0a5b15007766 update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 27932
diff changeset
3 // Copyright (C) 1993-2021 The Octave Project Developers
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
4 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 // See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 // distribution or <https://octave.org/copyright/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
7 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
8 // This file is part of Octave.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
9 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
10 // Octave is free software: you can redistribute it and/or modify it
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
11 // under the terms of the GNU General Public License as published by
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
12 // the Free Software Foundation, either version 3 of the License, or
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
13 // (at your option) any later version.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
14 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
15 // Octave is distributed in the hope that it will be useful, but
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
18 // GNU General Public License for more details.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
19 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
20 // You should have received a copy of the GNU General Public License
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
21 // along with Octave; see the file COPYING. If not, see
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
22 // <https://www.gnu.org/licenses/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ////////////////////////////////////////////////////////////////////////
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
25
20791
f7084eae3318 maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents: 20785
diff changeset
26 #if ! defined (octave_error_h)
383
0b52c68ec81f [project @ 1994-03-09 21:19:44 by jwe]
jwe
parents: 240
diff changeset
27 #define octave_error_h 1
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
28
21244
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 21157
diff changeset
29 #include "octave-config.h"
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 21157
diff changeset
30
6355
7b124b265c34 [project @ 2007-02-25 16:25:52 by jwe]
jwe
parents: 6338
diff changeset
31 #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
32 #include <cinttypes>
3935
1ea29376e43e [project @ 2002-05-16 05:30:51 by jwe]
jwe
parents: 3815
diff changeset
33 #include <string>
1489
3e705c864019 [project @ 1995-09-28 05:38:26 by jwe]
jwe
parents: 1428
diff changeset
34
21743
f4d7d0eb5b0c use namespace for unwind_protect class
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
35 #include "unwind-prot.h"
f4d7d0eb5b0c use namespace for unwind_protect class
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
36
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
37 #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
38
10605
1834132fb50b allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents: 10313
diff changeset
39 class octave_value_list;
29960
939bef0b66e0 merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents: 29956
diff changeset
40
939bef0b66e0 merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents: 29956
diff changeset
41 OCTAVE_NAMESPACE_BEGIN
10605
1834132fb50b allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents: 10313
diff changeset
42
29960
939bef0b66e0 merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents: 29956
diff changeset
43 class execution_exception;
939bef0b66e0 merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents: 29956
diff changeset
44
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
45 class error_system
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
46 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
47 public:
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
48
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
49 OCTINTERP_API error_system (interpreter& interp);
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
50
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
51 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
52
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
53 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
54
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
55 ~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
56
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
57 OCTINTERP_API octave_value
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
58 debug_on_error (const octave_value_list& args, int nargout);
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
59
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
60 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
61
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
62 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
63
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
64 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
65 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
66 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
67 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
68 return val;
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
69 }
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
70
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
71 OCTINTERP_API octave_value
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
72 debug_on_caught (const octave_value_list& args, int nargout);
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
73
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
74 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
75
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
76 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
77
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
78 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
79 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
80 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
81 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
82 return val;
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
83 }
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
84
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
85 OCTINTERP_API octave_value
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
86 debug_on_warning (const octave_value_list& args, int nargout);
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
87
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
88 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
89
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
90 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
91
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
92 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
93 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
94 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
95 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
96 return val;
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
97 }
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
98
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
99 OCTINTERP_API octave_value
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
100 discard_warning_messages (const octave_value_list& args, int nargout);
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
101
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
102 void set_discard_warning_messages (bool flag)
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
103 {
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
104 m_discard_warning_messages = flag;
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
105 }
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
106
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
107 bool discard_warning_messages (void) const
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
108 {
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
109 return m_discard_warning_messages;
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
110 }
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
111
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
112 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
113 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
114 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
115 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
116 return val;
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
117 }
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
118
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
119 OCTINTERP_API octave_value
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
120 beep_on_error (const octave_value_list& args, int nargout);
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
121
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
122 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
123
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
124 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
125
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
126 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
127 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
128 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
129 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
130 return val;
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
131 }
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
132
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
133 OCTINTERP_API octave_value
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
134 backtrace_on_warning (const octave_value_list& args, int nargout);
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
135
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
136 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
137
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
138 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
139
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
140 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
141 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
142 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
143 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
144 return val;
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
145 }
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
146
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
147 OCTINTERP_API octave_value
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
148 verbose_warning (const octave_value_list& args, int nargout);
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
149
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
150 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
151
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
152 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
153
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
154 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
155 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
156 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
157 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
158 return val;
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
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
161 OCTINTERP_API octave_value
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
162 quiet_warning (const octave_value_list& args, int nargout);
27160
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 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
165
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
166 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
167
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
168 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
169 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
170 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
171 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
172 return val;
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
173 }
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
174
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
175 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
176
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
177 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
178
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
179 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
180 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
181 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
182 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
183 return val;
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
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
186 OCTINTERP_API octave_value
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
187 last_error_message (const octave_value_list& args, int nargout);
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
188
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
189 void set_last_error_message (const std::string& val)
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
190 {
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
191 m_last_error_message = val;
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
192 }
27160
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 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
195
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
196 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
197 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
198 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
199 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
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
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
203 OCTINTERP_API octave_value
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
204 last_warning_message (const octave_value_list& args, int nargout);
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
205
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
206 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
207
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
208 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
209
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
210 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
211 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
212 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
213 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
214 return val;
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
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
217 OCTINTERP_API octave_value
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
218 last_warning_id (const octave_value_list& args, int nargout);
27160
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 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
221
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
222 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
223
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
224 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
225 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
226 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
227 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
228 return val;
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
229 }
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
230
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
231 OCTINTERP_API octave_value
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
232 last_error_id (const octave_value_list& args, int nargout);
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
233
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
234 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
235
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
236 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
237
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
238 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
239 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
240 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
241 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
242 return val;
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
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
245 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
246 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
247 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
248 }
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 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
251
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
252 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
253 {
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
254 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
255 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
256 return val;
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
257 }
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
258
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
259 static OCTINTERP_API octave_map
28857
43ad651cf5a0 eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents: 27932
diff changeset
260 make_stack_map (const std::list<frame_info>& frames);
27472
c0883bfc0f36 simplify evaluator logic for try-catch command
John W. Eaton <jwe@octave.org>
parents: 27471
diff changeset
261
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
262 static OCTINTERP_API std::list<frame_info>
27472
c0883bfc0f36 simplify evaluator logic for try-catch command
John W. Eaton <jwe@octave.org>
parents: 27471
diff changeset
263 make_stack_frame_list (const octave_map& stack);
c0883bfc0f36 simplify evaluator logic for try-catch command
John W. Eaton <jwe@octave.org>
parents: 27471
diff changeset
264
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
265 //! For given warning ID, return 0 if warnings are disabled, 1 if
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
266 //! enabled, and 2 if the given ID should be an error instead of a
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
267 //! warning.
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
268
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
269 OCTINTERP_API int warning_enabled (const std::string& id);
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
270
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
271 OCTINTERP_API void
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
272 verror (bool save_last_error, std::ostream& os, const char *name,
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
273 const char *id, const char *fmt, va_list args,
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
274 bool with_cfn = false);
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
275
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
276 OCTINTERP_API void
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
277 vwarning (const char *name, const char *id, const char *fmt,
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
278 va_list args);
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
279
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
280 OCTAVE_NORETURN
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
281 OCTINTERP_API void
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
282 error_1 (execution_exception& ee, const char *id, const char *fmt,
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
283 va_list args);
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
284
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
285 OCTAVE_NORETURN
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
286 OCTINTERP_API void error_1 (const char *id, const char *fmt, va_list args);
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27161
diff changeset
287
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27161
diff changeset
288 OCTAVE_NORETURN
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
289 OCTINTERP_API void vusage (const char *id, const char *fmt, va_list args);
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
290
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
291 OCTINTERP_API void vwarning (const char *id, const char *fmt, va_list args);
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
292
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27161
diff changeset
293 OCTAVE_NORETURN
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
294 OCTINTERP_API void
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
295 rethrow_error (const std::string& id, const std::string& msg,
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
296 const octave_map& stack);
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
297
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
298 OCTAVE_NORETURN
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
299 OCTINTERP_API void vpanic (const char *fmt, va_list args);
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
300
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
301 OCTAVE_NORETURN
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
302 OCTINTERP_API void panic (const char *fmt, ...);
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
303
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
304 OCTINTERP_API octave_scalar_map warning_query (const std::string& id_arg);
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
305
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
306 OCTINTERP_API std::string default_warning_state (void);
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
307
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
308 OCTINTERP_API void display_warning_options (std::ostream& os);
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
309
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
310 OCTINTERP_API void
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
311 set_warning_option (const std::string& state, const std::string& id);
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
312
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
313 OCTINTERP_API void disable_warning (const std::string& id);
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
314
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
315 OCTINTERP_API void initialize_default_warning_state (void);
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
316
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
317 OCTINTERP_API void interpreter_try (unwind_protect& frame);
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27161
diff changeset
318
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27161
diff changeset
319 // Throw execution_exception or, if debug_on_error is TRUE, enter
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27161
diff changeset
320 // debugger. If stack_info is empty, use current call stack.
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27161
diff changeset
321
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27161
diff changeset
322 OCTAVE_NORETURN
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
323 OCTINTERP_API void
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
324 throw_error (const std::string& err_type,
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
325 const std::string& id,
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
326 const std::string& message,
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
327 const std::list<frame_info>& stack_info
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
328 = std::list<frame_info> ());
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27161
diff changeset
329
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27161
diff changeset
330 OCTAVE_NORETURN
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
331 OCTINTERP_API void throw_error (execution_exception& ee);
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27161
diff changeset
332
29233
665c9ed14c97 Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29171
diff changeset
333 OCTINTERP_API void save_exception (const execution_exception& ee);
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27161
diff changeset
334
29954
4c88a452519c rename OCTAVE_USE_DEPRECATED_FUNCTIONS macro and attempt to make it work
John W. Eaton <jwe@octave.org>
parents: 29501
diff changeset
335 // FIXME
4c88a452519c rename OCTAVE_USE_DEPRECATED_FUNCTIONS macro and attempt to make it work
John W. Eaton <jwe@octave.org>
parents: 29501
diff changeset
336 //#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
29501
220c6c4a3533 leave error message output stream decision to error_system class
John W. Eaton <jwe@octave.org>
parents: 29359
diff changeset
337 OCTAVE_DEPRECATED (7, "second argument is no longer accepted")
220c6c4a3533 leave error message output stream decision to error_system class
John W. Eaton <jwe@octave.org>
parents: 29359
diff changeset
338 OCTINTERP_API void display_exception (const execution_exception& ee,
220c6c4a3533 leave error message output stream decision to error_system class
John W. Eaton <jwe@octave.org>
parents: 29359
diff changeset
339 std::ostream& os) const;
29954
4c88a452519c rename OCTAVE_USE_DEPRECATED_FUNCTIONS macro and attempt to make it work
John W. Eaton <jwe@octave.org>
parents: 29501
diff changeset
340 //#endif
29501
220c6c4a3533 leave error message output stream decision to error_system class
John W. Eaton <jwe@octave.org>
parents: 29359
diff changeset
341
220c6c4a3533 leave error message output stream decision to error_system class
John W. Eaton <jwe@octave.org>
parents: 29359
diff changeset
342 OCTINTERP_API void display_exception (const execution_exception& ee) const;
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
343
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
344 private:
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 interpreter& m_interpreter;
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 //! 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
349 //! 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
350 //! 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
351
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
352 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
353
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
354 //! 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
355 //! 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
356
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
357 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
358
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
359 //! 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
360 //! is encountered.
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
361
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
362 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
363
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
364 //! 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
365
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
366 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
367
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
368 //! 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
369 //! printing error messages.
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
370 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
371
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
372 //! 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
373 //! warning is encountered.
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
374 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
375
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
376 //! 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
377 //! unused.
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
378 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
379
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
380 //! 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
381 //! be updated
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
382 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
383
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
384 //! 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
385 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
386
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
387 //! 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
388 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
389
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
390 //! 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
391 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
392
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
393 //! 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
394 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
395
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
396 //! 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
397 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
398
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
399 //! 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
400 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
401 };
29960
939bef0b66e0 merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents: 29956
diff changeset
402
939bef0b66e0 merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents: 29956
diff changeset
403 OCTAVE_NAMESPACE_END
27160
6b0c61a5a0f0 move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents: 27129
diff changeset
404
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
405 // FIXME: should we move the following functions inside the octave
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
406 // namespace? If so, should the functions outside of the namespace be
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
407 // deprecated? Doing that might cause a lot of trouble... If they are
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
408 // not deprecated and eventually removed, does it make sense to also
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
409 // define them inside the octave namespace?
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
410
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
411 #define panic_impossible() \
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
412 panic ("impossible state reached in file '%s' at line %d", __FILE__, __LINE__)
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
413
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
414 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
415 vmessage (const char *name, const char *fmt, va_list args);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
416
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
417 OCTAVE_FORMAT_PRINTF (2, 3)
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
418 extern OCTINTERP_API void message (const char *name, const char *fmt, ...);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
419
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
420 extern OCTINTERP_API void vwarning (const char *fmt, va_list args);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
421
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
422 OCTAVE_FORMAT_PRINTF (1, 2)
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
423 extern OCTINTERP_API void warning (const char *fmt, ...);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
424
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
425 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
426 extern OCTINTERP_API void verror (const char *fmt, va_list args);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
427
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
428 OCTAVE_FORMAT_PRINTF (1, 2)
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
429 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
430 extern OCTINTERP_API void error (const char *fmt, ...);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
431
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
432 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
433 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
434 verror (octave::execution_exception&, const char *fmt, va_list args);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
435
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
436 OCTAVE_FORMAT_PRINTF (2, 3)
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
437 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
438 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
439 error (octave::execution_exception&, const char *fmt, ...);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
440
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
441 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
442 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
443 verror_with_cfn (const char *fmt, va_list args);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
444
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
445 OCTAVE_FORMAT_PRINTF (1, 2)
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
446 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
447 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
448 error_with_cfn (const char *fmt, ...);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
449
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
450 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
451 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
452 vparse_error (const char *fmt, va_list args);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
453
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
454 OCTAVE_FORMAT_PRINTF (1, 2)
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
455 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
456 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
457 parse_error (const char *fmt, ...);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
458
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
459 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
460 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
461 vusage_with_id (const char *id, const char *fmt, va_list args);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
462
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
463 OCTAVE_FORMAT_PRINTF (2, 3)
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
464 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
465 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
466 usage_with_id (const char *id, const char *fmt, ...);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
467
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
468 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
469 vwarning_with_id (const char *id, const char *fmt, va_list args);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
470
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
471 OCTAVE_FORMAT_PRINTF (2, 3)
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
472 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
473 warning_with_id (const char *id, const char *fmt, ...);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
474
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
475 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
476 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
477 verror_with_id (const char *id, const char *fmt, va_list args);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
478
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
479 OCTAVE_FORMAT_PRINTF (2, 3)
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
480 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
481 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
482 error_with_id (const char *id, const char *fmt, ...);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
483
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
484 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
485 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
486 verror_with_id_cfn (const char *id, const char *fmt, va_list args);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
487
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
488 OCTAVE_FORMAT_PRINTF (2, 3)
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
489 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
490 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
491 error_with_id_cfn (const char *id, const char *fmt, ...);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
492
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
493 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
494 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
495 vparse_error_with_id (const char *id, const char *fmt, va_list args);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
496
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
497 OCTAVE_FORMAT_PRINTF (2, 3)
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
498 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
499 extern OCTINTERP_API void
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
500 parse_error_with_id (const char *id, const char *fmt, ...);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
501
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
502 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
503 extern OCTINTERP_API void vpanic (const char *fmt, va_list args);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
504
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
505 OCTAVE_FORMAT_PRINTF (1, 2)
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
506 OCTAVE_NORETURN
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
507 extern OCTINTERP_API void panic (const char *fmt, ...);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
508
29956
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
509 OCTAVE_NAMESPACE_BEGIN
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
510
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
511 //! Helper function for print_usage defined in defun.cc.
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
512
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
513 extern OCTINTERP_API void defun_usage_message (const std::string& msg);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
514
29956
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
515 // Convenience functions.
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
516
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
517 extern OCTINTERP_API octave_value_list
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
518 set_warning_state (const std::string& id, const std::string& state);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
519
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
520 extern OCTINTERP_API octave_value_list
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
521 set_warning_state (const octave_value_list& args);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
522
29956
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
523 extern OCTINTERP_API int warning_enabled (const std::string& id);
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
524
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
525 extern OCTINTERP_API void disable_warning (const std::string& id);
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
526
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27161
diff changeset
527 extern OCTINTERP_API void interpreter_try (octave::unwind_protect&);
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
528
29956
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
529 OCTAVE_NAMESPACE_END
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
530
29954
4c88a452519c rename OCTAVE_USE_DEPRECATED_FUNCTIONS macro and attempt to make it work
John W. Eaton <jwe@octave.org>
parents: 29501
diff changeset
531 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
29956
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
532 OCTAVE_DEPRECATED (7, "use 'octave::defun_usage_message' instead")
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
533 inline void defun_usage_message (const std::string& msg)
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
534 {
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
535 octave::defun_usage_message (msg);
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
536 }
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
537
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
538 OCTAVE_DEPRECATED (7, "use 'octave::set_warning_state' instead")
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
539 inline octave_value_list
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
540 set_warning_state (const std::string& id, const std::string& state)
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
541 {
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
542 return octave::set_warning_state (id, state);
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
543 }
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
544
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
545 OCTAVE_DEPRECATED (7, "use 'octave::set_warning_state' instead")
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
546 inline octave_value_list set_warning_state (const octave_value_list& args)
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
547 {
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
548 return octave::set_warning_state (args);
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
549 }
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
550
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
551 OCTAVE_DEPRECATED (7, "use 'octave::warning_enabled' instead")
29976
c44c72cc68a0 fix inline/extern declaration error in previous change
John W. Eaton <jwe@octave.org>
parents: 29960
diff changeset
552 inline OCTINTERP_API int warning_enabled (const std::string& id)
29956
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
553 {
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
554 return octave::warning_enabled (id);
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
555 }
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
556
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
557 OCTAVE_DEPRECATED (7, "use 'octave::disable_warning' instead")
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
558 inline void disable_warning (const std::string& id)
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
559 {
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
560 octave::disable_warning (id);
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
561 }
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
562
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
563 OCTAVE_DEPRECATED (7, "use 'octave::interpreter_try' instead")
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
564 inline void interpreter_try (octave::unwind_protect& uwp)
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
565 {
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
566 octave::interpreter_try (uwp);
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
567 }
a956ca6698d2 move some error handling functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 29954
diff changeset
568
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27161
diff changeset
569 OCTAVE_DEPRECATED (6, "this function is obsolete and should not be needed")
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27161
diff changeset
570 inline void reset_error_handler (void) { }
29954
4c88a452519c rename OCTAVE_USE_DEPRECATED_FUNCTIONS macro and attempt to make it work
John W. Eaton <jwe@octave.org>
parents: 29501
diff changeset
571 #endif
27161
7883e6e71b0a additional refactoring of error handling functions
John W. Eaton <jwe@octave.org>
parents: 27160
diff changeset
572
30021
973142706c0f * error.h (error_state): Declare unconditionally.
John W. Eaton <jwe@octave.org>
parents: 29976
diff changeset
573 // This symbol must have be declared with the correct visibility
973142706c0f * error.h (error_state): Declare unconditionally.
John W. Eaton <jwe@octave.org>
parents: 29976
diff changeset
574 // attributes when Octave is built, so it must appear unconditionally in
973142706c0f * error.h (error_state): Declare unconditionally.
John W. Eaton <jwe@octave.org>
parents: 29976
diff changeset
575 // this header file.
973142706c0f * error.h (error_state): Declare unconditionally.
John W. Eaton <jwe@octave.org>
parents: 29976
diff changeset
576 OCTAVE_DEPRECATED (6, "this variable is obsolete and always has the value 0")
973142706c0f * error.h (error_state): Declare unconditionally.
John W. Eaton <jwe@octave.org>
parents: 29976
diff changeset
577 extern OCTINTERP_API int error_state;
973142706c0f * error.h (error_state): Declare unconditionally.
John W. Eaton <jwe@octave.org>
parents: 29976
diff changeset
578
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
579 #endif