annotate liboctave/util/quit.h @ 29135:1dbeca38c776 stable

Allow Octave class execution_exception to catch std::exception objects (bug #59592). * quit.h (class octave::execution_exception): Use keyword "public" when inheriting from std::runtime_error.
author Rik <rik@octave.org>
date Wed, 02 Dec 2020 14:06:13 -0800
parents 9a965fec21c1
children 6b3faa844395 0a5b15007766
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 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
3 // Copyright (C) 2002-2020 The Octave Project Developers
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 ////////////////////////////////////////////////////////////////////////
4153
6b96ce9f5743 [project @ 2002-11-06 20:38:49 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_quit_h)
4153
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
27 #define octave_quit_h 1
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
28
21244
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 21227
diff changeset
29 #include "octave-config.h"
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 21227
diff changeset
30
21941
1d23b75cbcd1 hide signal.h from C++ sources
John W. Eaton <jwe@octave.org>
parents: 21849
diff changeset
31 /* The signal header is just needed for the sig_atomic_t type. */
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
32 #if defined (__cplusplus)
21941
1d23b75cbcd1 hide signal.h from C++ sources
John W. Eaton <jwe@octave.org>
parents: 21849
diff changeset
33 # include <csignal>
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
34 # include <iosfwd>
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
35 # include <list>
27997
e90e3155cd01 derive execution_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27933
diff changeset
36 # include <stdexcept>
21202
f7121e111991 maint: indent #ifdef blocks in liboctave and src directories.
Rik <rik@octave.org>
parents: 21040
diff changeset
37 # include <string>
4153
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
38 extern "C" {
21941
1d23b75cbcd1 hide signal.h from C++ sources
John W. Eaton <jwe@octave.org>
parents: 21849
diff changeset
39 #else
1d23b75cbcd1 hide signal.h from C++ sources
John W. Eaton <jwe@octave.org>
parents: 21849
diff changeset
40 # include <signal.h>
4153
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
41 #endif
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
42
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
43 #if defined (__cplusplus)
22094
9203833cab7d move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
44
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
45 namespace octave
7481
78f3811155f7 use exceptions in liboctave error handler
John W. Eaton <jwe@octave.org>
parents: 7017
diff changeset
46 {
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
47 class frame_info
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
48 {
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
49 public:
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
50
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
51 frame_info (void) = default;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
52
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
53 frame_info (const std::string& file_name, const std::string& fcn_name,
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
54 int line, int column)
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
55 : m_file_name (file_name), m_fcn_name (fcn_name), m_line (line),
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
56 m_column (column)
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
57 { }
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
58
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
59 frame_info (const frame_info&) = default;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
60
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
61 frame_info& operator = (const frame_info&) = default;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
62
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
63 ~frame_info (void) = default;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
64
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
65 std::string file_name (void) const { return m_file_name; }
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
66
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
67 std::string fcn_name (void) const { return m_fcn_name; }
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
68
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
69 int line (void) const { return m_line; }
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
70
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
71 int column (void) const { return m_column; }
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
72
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
73 private:
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
74
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
75 std::string m_file_name;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
76
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
77 std::string m_fcn_name;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
78
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
79 int m_line;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
80
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
81 int m_column;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
82 };
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
83
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
84 inline bool operator == (const frame_info& a, const frame_info& b)
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
85 {
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
86 return (a.file_name () == b.file_name ()
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
87 && a.fcn_name () == b.fcn_name ()
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
88 && a.line () == b.line ()
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
89 && a.column () == b.column ());
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
90 }
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
91
29135
1dbeca38c776 Allow Octave class execution_exception to catch std::exception objects (bug #59592).
Rik <rik@octave.org>
parents: 28012
diff changeset
92 class execution_exception : public std::runtime_error
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
93 {
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
94 public:
20666
e0e2c2ce7e94 defer stack trace until back at top level
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
95
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
96 typedef std::list<frame_info> stack_info_type;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
97
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
98 execution_exception (const std::string& err_type = "error",
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
99 const std::string& id = "",
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
100 const std::string& message = "unspecified error",
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
101 const stack_info_type& stack_info = stack_info_type ())
27997
e90e3155cd01 derive execution_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27933
diff changeset
102 : runtime_error (message), m_err_type (err_type), m_id (id),
e90e3155cd01 derive execution_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27933
diff changeset
103 m_message (message), m_stack_info (stack_info)
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
104 { }
20666
e0e2c2ce7e94 defer stack trace until back at top level
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
105
27381
d4fdaeaab7f3 use default or deleted ctors/dtors/assignment ops in liboctave/util
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
106 execution_exception (const execution_exception&) = default;
20666
e0e2c2ce7e94 defer stack trace until back at top level
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
107
27381
d4fdaeaab7f3 use default or deleted ctors/dtors/assignment ops in liboctave/util
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
108 execution_exception& operator = (const execution_exception&) = default;
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
109
22868
87e3163f6c87 use c++11 "= default" syntax for declaration of trivial destructors
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
110 ~execution_exception (void) = default;
20666
e0e2c2ce7e94 defer stack trace until back at top level
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
111
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
112 void set_err_type (const std::string& et)
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
113 {
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
114 m_err_type = et;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
115 }
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
116
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
117 std::string err_type (void) const { return m_err_type; }
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
118
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
119 virtual std::string stack_trace (void) const;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
120
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
121 void set_identifier (const std::string& id)
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
122 {
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
123 m_id = id;
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
124 }
20666
e0e2c2ce7e94 defer stack trace until back at top level
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
125
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
126 virtual std::string identifier (void) const { return m_id; }
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
127
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
128 void set_message (const std::string& msg)
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
129 {
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
130 m_message = msg;
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
131 }
20785
b6f2909e7f94 always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents: 20666
diff changeset
132
28012
9a965fec21c1 refactor index_exception classes to accommodate std::exception::what method
John W. Eaton <jwe@octave.org>
parents: 28000
diff changeset
133 std::string message (void) const { return m_message; }
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
134
27997
e90e3155cd01 derive execution_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27933
diff changeset
135 // Provided for std::exception interface.
e90e3155cd01 derive execution_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27933
diff changeset
136 const char * what (void) const noexcept { return m_message.c_str (); }
e90e3155cd01 derive execution_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27933
diff changeset
137
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
138 virtual stack_info_type stack_info (void) const
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
139 {
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
140 return m_stack_info;
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
141 }
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
142
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
143 void set_stack_info (const stack_info_type& stack_info)
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
144 {
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
145 m_stack_info = stack_info;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
146 }
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
147
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
148 virtual void display (std::ostream& os) const;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
149
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
150 private:
20666
e0e2c2ce7e94 defer stack trace until back at top level
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
151
27471
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
152 std::string m_err_type;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
153
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
154 std::string m_id;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
155
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
156 std::string m_message;
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
157
fd32c1a9b1bd revamp error handling
John W. Eaton <jwe@octave.org>
parents: 27381
diff changeset
158 stack_info_type m_stack_info;
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
159 };
20785
b6f2909e7f94 always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents: 20666
diff changeset
160
28000
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
161 class exit_exception : public std::exception
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
162 {
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
163 public:
7481
78f3811155f7 use exceptions in liboctave error handler
John W. Eaton <jwe@octave.org>
parents: 7017
diff changeset
164
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
165 exit_exception (int exit_status = 0, bool safe_to_return = false)
28000
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
166 : std::exception (), m_exit_status (exit_status),
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
167 m_safe_to_return (safe_to_return)
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
168 { }
22094
9203833cab7d move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
169
28000
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
170 exit_exception (const exit_exception&) = default;
22094
9203833cab7d move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
171
28000
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
172 exit_exception& operator = (exit_exception&) = default;
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
173
22868
87e3163f6c87 use c++11 "= default" syntax for declaration of trivial destructors
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
174 ~exit_exception (void) = default;
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
175
28000
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
176 const char * what (void) const noexcept { return "exit exception"; }
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
177
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
178 int exit_status (void) const { return m_exit_status; }
22094
9203833cab7d move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
179
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
180 bool safe_to_return (void) const { return m_safe_to_return; }
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
181
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
182 private:
22094
9203833cab7d move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
183
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
184 int m_exit_status;
22094
9203833cab7d move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
185
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
186 bool m_safe_to_return;
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
187 };
22094
9203833cab7d move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
188
28000
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
189 class interrupt_exception : public std::exception
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
190 {
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
191 public:
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
192
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
193 interrupt_exception (void) = default;
27997
e90e3155cd01 derive execution_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27933
diff changeset
194
28000
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
195 interrupt_exception (const interrupt_exception&) = default;
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
196
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
197 interrupt_exception& operator = (const interrupt_exception&) = default;
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
198
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
199 ~interrupt_exception (void) = default;
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
200
768b54395b31 also derive exit_exception and interrupt_exception from std::exception
John W. Eaton <jwe@octave.org>
parents: 27997
diff changeset
201 const char * what (void) const noexcept { return "interrupt exception"; }
22327
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
202 };
d0562b3159c7 move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
203 }
22094
9203833cab7d move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
204
4153
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
205 #endif
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
206
27933
863ae57eee69 maint: Use Octave coding conventions in liboctave/
Rik <rik@octave.org>
parents: 27923
diff changeset
207 // The following enum values are deprecated and will eventually be
863ae57eee69 maint: Use Octave coding conventions in liboctave/
Rik <rik@octave.org>
parents: 27923
diff changeset
208 // removed from Octave, but there seems to be no universally good way
863ae57eee69 maint: Use Octave coding conventions in liboctave/
Rik <rik@octave.org>
parents: 27923
diff changeset
209 // to tag them with an attribute that will generate a warning.
27536
d389416f0e50 remove OCTAVE_DEPRECTED tags from enum values (bug #57092)
John W. Eaton <jwe@octave.org>
parents: 27520
diff changeset
210
27520
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
211 enum
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
212 octave_exception
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
213 {
27536
d389416f0e50 remove OCTAVE_DEPRECTED tags from enum values (bug #57092)
John W. Eaton <jwe@octave.org>
parents: 27520
diff changeset
214 octave_no_exception = 0,
d389416f0e50 remove OCTAVE_DEPRECTED tags from enum values (bug #57092)
John W. Eaton <jwe@octave.org>
parents: 27520
diff changeset
215 octave_exec_exception = 1,
d389416f0e50 remove OCTAVE_DEPRECTED tags from enum values (bug #57092)
John W. Eaton <jwe@octave.org>
parents: 27520
diff changeset
216 octave_alloc_exception = 3,
d389416f0e50 remove OCTAVE_DEPRECTED tags from enum values (bug #57092)
John W. Eaton <jwe@octave.org>
parents: 27520
diff changeset
217 octave_quit_exception = 4
27520
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
218 };
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
219
5133
7191f6e086f9 [project @ 2005-02-08 19:17:41 by jwe]
jwe
parents: 4793
diff changeset
220 /*
7191f6e086f9 [project @ 2005-02-08 19:17:41 by jwe]
jwe
parents: 4793
diff changeset
221 > 0: interrupt pending
7191f6e086f9 [project @ 2005-02-08 19:17:41 by jwe]
jwe
parents: 4793
diff changeset
222 0: no interrupt pending
7191f6e086f9 [project @ 2005-02-08 19:17:41 by jwe]
jwe
parents: 4793
diff changeset
223 < 0: handling interrupt
7191f6e086f9 [project @ 2005-02-08 19:17:41 by jwe]
jwe
parents: 4793
diff changeset
224 */
21227
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21213
diff changeset
225 OCTAVE_API extern sig_atomic_t octave_interrupt_state;
4180
84fe3ca3a246 [project @ 2002-11-15 04:47:01 by jwe]
jwe
parents: 4155
diff changeset
226
27520
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
227 OCTAVE_DEPRECATED (6, "'octave_exception_state' is an obsolete internal variable; any uses should be removed")
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
228 OCTAVE_API extern sig_atomic_t octave_exception_state;
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
229
21227
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21213
diff changeset
230 OCTAVE_API extern volatile sig_atomic_t octave_signal_caught;
5142
0f9108f298ab [project @ 2005-02-12 02:29:34 by jwe]
jwe
parents: 5133
diff changeset
231
21227
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21213
diff changeset
232 OCTAVE_API extern void octave_handle_signal (void);
5142
0f9108f298ab [project @ 2005-02-12 02:29:34 by jwe]
jwe
parents: 5133
diff changeset
233
27520
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
234 OCTAVE_DEPRECATED (6, "use 'throw octave::interrupt_exception' instead")
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
235 OCTAVE_NORETURN OCTAVE_API extern void octave_throw_interrupt_exception (void);
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
236
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
237 OCTAVE_DEPRECATED (6, "use 'throw octave::execution_exception' instead")
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
238 OCTAVE_NORETURN OCTAVE_API extern void octave_throw_execution_exception (void);
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
239
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
240 OCTAVE_DEPRECATED (6, "use 'throw std::bad_alloc' instead")
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
241 OCTAVE_NORETURN OCTAVE_API extern void octave_throw_bad_alloc (void);
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
242
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
243 OCTAVE_DEPRECATED (6, "use 'throw' instead")
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
244 OCTAVE_API extern void octave_rethrow_exception (void);
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
245
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
246 #if defined (__cplusplus)
22094
9203833cab7d move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
247
10142
829e69ec3110 make OCTAVE_QUIT a function
Jaroslav Hajek <highegg@gmail.com>
parents: 9933
diff changeset
248 inline void octave_quit (void)
829e69ec3110 make OCTAVE_QUIT a function
Jaroslav Hajek <highegg@gmail.com>
parents: 9933
diff changeset
249 {
829e69ec3110 make OCTAVE_QUIT a function
Jaroslav Hajek <highegg@gmail.com>
parents: 9933
diff changeset
250 if (octave_signal_caught)
27520
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
251 {
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
252 octave_signal_caught = 0;
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
253 octave_handle_signal ();
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
254 }
10142
829e69ec3110 make OCTAVE_QUIT a function
Jaroslav Hajek <highegg@gmail.com>
parents: 9933
diff changeset
255 };
829e69ec3110 make OCTAVE_QUIT a function
Jaroslav Hajek <highegg@gmail.com>
parents: 9933
diff changeset
256
829e69ec3110 make OCTAVE_QUIT a function
Jaroslav Hajek <highegg@gmail.com>
parents: 9933
diff changeset
257 #define OCTAVE_QUIT octave_quit ()
829e69ec3110 make OCTAVE_QUIT a function
Jaroslav Hajek <highegg@gmail.com>
parents: 9933
diff changeset
258
829e69ec3110 make OCTAVE_QUIT a function
Jaroslav Hajek <highegg@gmail.com>
parents: 9933
diff changeset
259 #else
829e69ec3110 make OCTAVE_QUIT a function
Jaroslav Hajek <highegg@gmail.com>
parents: 9933
diff changeset
260
22197
e43d83253e28 refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents: 22094
diff changeset
261 #define OCTAVE_QUIT \
e43d83253e28 refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents: 22094
diff changeset
262 do \
e43d83253e28 refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents: 22094
diff changeset
263 { \
e43d83253e28 refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents: 22094
diff changeset
264 if (octave_signal_caught) \
27520
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
265 { \
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
266 octave_signal_caught = 0; \
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
267 octave_handle_signal (); \
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
268 } \
22197
e43d83253e28 refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents: 22094
diff changeset
269 } \
4153
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
270 while (0)
10142
829e69ec3110 make OCTAVE_QUIT a function
Jaroslav Hajek <highegg@gmail.com>
parents: 9933
diff changeset
271 #endif
4153
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
272
24520
c5c11b07598a refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
273 /* The following macros are obsolete. Interrupting immediately by
c5c11b07598a refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
274 calling siglongjmp or similar from a signal handler is asking for
27480
63b417917f5e remove some obsolete signal handling functions
John W. Eaton <jwe@octave.org>
parents: 27471
diff changeset
275 trouble. Rather than remove them, however, please leave them in
63b417917f5e remove some obsolete signal handling functions
John W. Eaton <jwe@octave.org>
parents: 27471
diff changeset
276 place so that old code that uses them will continue to compile. They
63b417917f5e remove some obsolete signal handling functions
John W. Eaton <jwe@octave.org>
parents: 27471
diff changeset
277 are defined to create a dummy do-while block to match the previous
63b417917f5e remove some obsolete signal handling functions
John W. Eaton <jwe@octave.org>
parents: 27471
diff changeset
278 definitions. */
4302
ebc2d8e4968b [project @ 2003-01-22 22:02:23 by jwe]
jwe
parents: 4268
diff changeset
279
22197
e43d83253e28 refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents: 22094
diff changeset
280 #define BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE \
24520
c5c11b07598a refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
281 do \
c5c11b07598a refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
282 {
4302
ebc2d8e4968b [project @ 2003-01-22 22:02:23 by jwe]
jwe
parents: 4268
diff changeset
283
24520
c5c11b07598a refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
284 #define END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE \
c5c11b07598a refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
285 } \
4153
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
286 while (0)
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
287
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
288 #if defined (__cplusplus)
4196
f874c6c68845 [project @ 2002-11-20 22:27:01 by jwe]
jwe
parents: 4182
diff changeset
289
24520
c5c11b07598a refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
290 /* Likewise, these are obsolete. They are defined to create a
c5c11b07598a refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
291 dummy scope to match the previous versions that created a try-catch
c5c11b07598a refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
292 block. */
4180
84fe3ca3a246 [project @ 2002-11-15 04:47:01 by jwe]
jwe
parents: 4155
diff changeset
293
24520
c5c11b07598a refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
294 #define BEGIN_INTERRUPT_WITH_EXCEPTIONS \
c5c11b07598a refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
295 {
c5c11b07598a refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
296
c5c11b07598a refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
297 #define END_INTERRUPT_WITH_EXCEPTIONS \
c5c11b07598a refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
298 }
c5c11b07598a refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
299
4196
f874c6c68845 [project @ 2002-11-20 22:27:01 by jwe]
jwe
parents: 4182
diff changeset
300 #endif
4153
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
301
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
302 #if defined (__cplusplus)
4153
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
303 }
4560
661246155bbc [project @ 2003-10-28 21:02:43 by jwe]
jwe
parents: 4551
diff changeset
304
4572
4623ef02a605 [project @ 2003-10-31 03:07:05 by jwe]
jwe
parents: 4560
diff changeset
305 /* These should only be declared for C++ code, and should also be
4623ef02a605 [project @ 2003-10-31 03:07:05 by jwe]
jwe
parents: 4560
diff changeset
306 outside of any extern "C" block. */
4560
661246155bbc [project @ 2003-10-28 21:02:43 by jwe]
jwe
parents: 4551
diff changeset
307
21227
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21213
diff changeset
308 extern OCTAVE_API void (*octave_signal_hook) (void);
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21213
diff changeset
309 extern OCTAVE_API void (*octave_interrupt_hook) (void);
4560
661246155bbc [project @ 2003-10-28 21:02:43 by jwe]
jwe
parents: 4551
diff changeset
310
27520
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
311 OCTAVE_DEPRECATED (6, "'octave_bad_alloc_hook' is obsolete and no longer used")
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
312 extern OCTAVE_API void (*octave_bad_alloc_hook) (void);
7a871724d4b0 restore some exception handling functions and variables and deprecate them
John W. Eaton <jwe@octave.org>
parents: 27480
diff changeset
313
4153
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
314 #endif
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
315
6b96ce9f5743 [project @ 2002-11-06 20:38:49 by jwe]
jwe
parents:
diff changeset
316 #endif