Mercurial > octave
annotate libinterp/corefcn/gripes.h @ 20756:200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
* gripes.h, gripes.cc (gripe_user_supplied_eval,
gripe_wrong_type_arg): New overloaded functions that accept
octave_execution_exception objects.
* error.h, error.cc (error, verror, error_1, usage_1,
debug_or_throw_exception): New overloaded functions that accept
* octave_execution_exception objects.
* __qp__.cc, cellfun.cc, daspk.cc, dasrt.cc, dassl.cc, data.cc,
file-io.cc, graphics.cc, graphics.in.h, input.cc, load-path.cc,
ls-mat-ascii.cc, lsode.cc, mex.cc, oct-handle.h, oct-map.cc,
oct-stream.cc, quad.cc, rand.cc, toplev.cc, utils.cc, variables.cc,
__eigs__.cc, ov-base.cc, ov-class.cc, ov-fcn-handle.cc,
ov-oncleanup.cc, ov.cc, octave.cc, oct-parse.in.yy: Propagate
octave_execution_exception objects through try/catch blocks.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 25 Nov 2015 15:27:48 -0500 |
parents | 68e3a747ca02 |
children | b6f2909e7f94 |
rev | line source |
---|---|
1 | 1 /* |
2 | |
19697
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
19030
diff
changeset
|
3 Copyright (C) 1993-2015 John W. Eaton |
1 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
1 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
1 | 20 |
21 */ | |
22 | |
383 | 23 #if !defined (octave_gripes_h) |
24 #define octave_gripes_h 1 | |
1 | 25 |
2374 | 26 #include <string> |
27 | |
11130
7c573eb981eb
consistently give error for operator not applied to NaN values
John W. Eaton <jwe@octave.org>
parents:
10405
diff
changeset
|
28 #include "lo-array-gripes.h" |
7c573eb981eb
consistently give error for operator not applied to NaN values
John W. Eaton <jwe@octave.org>
parents:
10405
diff
changeset
|
29 |
2086 | 30 class octave_value; |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
31 class octave_execution_exception; |
620 | 32 |
6109 | 33 extern OCTINTERP_API void |
2799 | 34 gripe_not_supported (const char *); |
35 | |
6109 | 36 extern OCTINTERP_API void |
6890 | 37 gripe_not_implemented (const char *); |
38 | |
39 extern OCTINTERP_API void | |
2799 | 40 gripe_string_invalid (void); |
41 | |
6109 | 42 extern OCTINTERP_API void |
2799 | 43 gripe_range_invalid (void); |
44 | |
6109 | 45 extern OCTINTERP_API void |
2799 | 46 gripe_nonconformant (void); |
47 | |
6109 | 48 extern OCTINTERP_API void |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
49 gripe_nonconformant (octave_idx_type r1, octave_idx_type c1, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
50 octave_idx_type r2, octave_idx_type c2); |
2799 | 51 |
6109 | 52 extern OCTINTERP_API void |
2799 | 53 gripe_empty_arg (const char *name, bool is_error); |
54 | |
6109 | 55 extern OCTINTERP_API void |
2799 | 56 gripe_square_matrix_required (const char *name); |
57 | |
6109 | 58 extern OCTINTERP_API void |
2799 | 59 gripe_user_supplied_eval (const char *name); |
60 | |
6109 | 61 extern OCTINTERP_API void |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
62 gripe_user_supplied_eval (const octave_execution_exception& e, |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
63 const char *name); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
64 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
65 extern OCTINTERP_API void |
2799 | 66 gripe_user_returned_invalid (const char *name); |
67 | |
6109 | 68 extern OCTINTERP_API void |
3523 | 69 gripe_invalid_conversion (const std::string& from, const std::string& to); |
2799 | 70 |
6109 | 71 extern OCTINTERP_API void |
2799 | 72 gripe_invalid_value_specified (const char *name); |
73 | |
6109 | 74 extern OCTINTERP_API void |
2799 | 75 gripe_2_or_3_dim_plot (void); |
76 | |
6109 | 77 extern OCTINTERP_API void |
2799 | 78 gripe_unrecognized_float_fmt (void); |
79 | |
6109 | 80 extern OCTINTERP_API void |
2799 | 81 gripe_unrecognized_data_fmt (const char *warn_for); |
82 | |
6109 | 83 extern OCTINTERP_API void |
2799 | 84 gripe_data_conversion (const char *from, const char *to); |
85 | |
6109 | 86 extern OCTINTERP_API void |
5602 | 87 gripe_wrong_type_arg (const char *name, const char *s, |
10313 | 88 bool is_error = true); |
5602 | 89 |
6109 | 90 extern OCTINTERP_API void |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
91 gripe_wrong_type_arg (const octave_execution_exception& e, |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
92 const char *name, const char *s, |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
93 bool is_error = true); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
94 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
95 extern OCTINTERP_API void |
3523 | 96 gripe_wrong_type_arg (const char *name, const std::string& s, |
10313 | 97 bool is_error = true); |
2799 | 98 |
6109 | 99 extern OCTINTERP_API void |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
100 gripe_wrong_type_arg (const octave_execution_exception& e, |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
101 const char *name, const std::string& s, |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
102 bool is_error = true); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
103 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
104 extern OCTINTERP_API void |
2799 | 105 gripe_wrong_type_arg (const char *name, const octave_value& tc, |
10313 | 106 bool is_error = true); |
2799 | 107 |
6109 | 108 extern OCTINTERP_API void |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
109 gripe_wrong_type_arg (const octave_execution_exception& e, |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
110 const char *name, const octave_value& tc, |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
111 bool is_error = true); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
112 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
113 extern OCTINTERP_API void |
7352 | 114 gripe_wrong_type_arg (const std::string& name, const octave_value& tc, |
10313 | 115 bool is_error = true); |
7352 | 116 |
117 extern OCTINTERP_API void | |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
118 gripe_wrong_type_arg (const octave_execution_exception& e, |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
119 const std::string& name, const octave_value& tc, |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
120 bool is_error = true); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
121 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
122 extern OCTINTERP_API void |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
123 gripe_wrong_type_arg (const char *s, bool is_error = true); |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
124 |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
125 extern OCTINTERP_API void |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
126 gripe_wrong_type_arg (const octave_execution_exception& e, |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
127 const char *s, bool is_error = true); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
128 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
129 extern OCTINTERP_API void |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
130 gripe_wrong_type_arg (const std::string& s, bool is_error = true); |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
131 |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
132 extern OCTINTERP_API void |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
133 gripe_wrong_type_arg (const octave_execution_exception& e, |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
134 const std::string& s, bool is_error = true); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
135 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
136 extern OCTINTERP_API void |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
137 gripe_wrong_type_arg (const octave_value& tc, bool is_error = true); |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
138 |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
139 extern OCTINTERP_API void |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
140 gripe_wrong_type_arg (const octave_execution_exception& e, |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
141 const octave_value& tc, bool is_error = true); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
142 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
143 extern OCTINTERP_API void |
2799 | 144 gripe_wrong_type_arg_for_unary_op (const octave_value& op); |
145 | |
6109 | 146 extern OCTINTERP_API void |
2799 | 147 gripe_wrong_type_arg_for_binary_op (const octave_value& op); |
148 | |
6109 | 149 extern OCTINTERP_API void |
5781 | 150 gripe_implicit_conversion (const char *id, const char *from, const char *to); |
2799 | 151 |
6109 | 152 extern OCTINTERP_API void |
5781 | 153 gripe_implicit_conversion (const std::string& id, const std::string& from, |
10313 | 154 const std::string& to); |
4452 | 155 |
6109 | 156 extern OCTINTERP_API void |
2799 | 157 gripe_divide_by_zero (void); |
1 | 158 |
6109 | 159 extern OCTINTERP_API void |
5943 | 160 gripe_logical_conversion (void); |
161 | |
8011
3100283874d7
improve backtrace error messages
John W. Eaton <jwe@octave.org>
parents:
7997
diff
changeset
|
162 extern OCTINTERP_API void |
8579
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8039
diff
changeset
|
163 gripe_invalid_inquiry_subscript (void); |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8039
diff
changeset
|
164 |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8039
diff
changeset
|
165 extern OCTINTERP_API void |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8039
diff
changeset
|
166 gripe_indexed_cs_list (void); |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8039
diff
changeset
|
167 |
9588
319e2ab9b8ae
warn about the complex comparison ops
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
168 extern OCTINTERP_API void |
10030
83bb2a78c07d
improve simple assignments error checks and messages
Jaroslav Hajek <highegg@gmail.com>
parents:
9648
diff
changeset
|
169 gripe_nonbraced_cs_list_assignment (void); |
83bb2a78c07d
improve simple assignments error checks and messages
Jaroslav Hajek <highegg@gmail.com>
parents:
9648
diff
changeset
|
170 |
83bb2a78c07d
improve simple assignments error checks and messages
Jaroslav Hajek <highegg@gmail.com>
parents:
9648
diff
changeset
|
171 extern OCTINTERP_API void |
9588
319e2ab9b8ae
warn about the complex comparison ops
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
172 gripe_warn_complex_cmp (void); |
319e2ab9b8ae
warn about the complex comparison ops
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
173 |
16899
55caca526827
New function to error due to disabled feature during build.
Carnë Draug <carandraug@octave.org>
parents:
16892
diff
changeset
|
174 extern OCTINTERP_API void |
55caca526827
New function to error due to disabled feature during build.
Carnë Draug <carandraug@octave.org>
parents:
16892
diff
changeset
|
175 gripe_disabled_feature (const std::string& func, const std::string& feature, |
55caca526827
New function to error due to disabled feature during build.
Carnë Draug <carandraug@octave.org>
parents:
16892
diff
changeset
|
176 const std::string& pkg="Octave"); |
19030
9ef10e6a5987
make "file found in path" warnings consistent
John W. Eaton <jwe@octave.org>
parents:
17787
diff
changeset
|
177 |
9ef10e6a5987
make "file found in path" warnings consistent
John W. Eaton <jwe@octave.org>
parents:
17787
diff
changeset
|
178 extern OCTINTERP_API void |
9ef10e6a5987
make "file found in path" warnings consistent
John W. Eaton <jwe@octave.org>
parents:
17787
diff
changeset
|
179 gripe_data_file_in_path (const std::string& fcn, const std::string& file); |
9ef10e6a5987
make "file found in path" warnings consistent
John W. Eaton <jwe@octave.org>
parents:
17787
diff
changeset
|
180 |
1 | 181 #endif |