Mercurial > octave
annotate libinterp/corefcn/gripes.cc @ 21026:5a340d8458d6
maint: Alphabetize list of gripes.
* gripes.h, gripes.cc: Alphabetize list of gripes.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 02 Jan 2016 10:28:59 -0800 |
parents | 48b2ad5ee801 |
children | 397f6ee4a35d |
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 | |
240 | 23 #ifdef HAVE_CONFIG_H |
1192 | 24 #include <config.h> |
1 | 25 #endif |
26 | |
5755 | 27 #include "defun.h" |
1352 | 28 #include "error.h" |
1 | 29 #include "gripes.h" |
20940
48b2ad5ee801
maint: Rename oct-obj.[cc|h] to ovl.[cc|h] for clarity.
Rik <rik@octave.org>
parents:
20785
diff
changeset
|
30 #include "ovl.h" |
5755 | 31 #include "utils.h" |
32 | |
21026 | 33 //////////////////////////////////////////////////////////////////////////////// |
34 // Alphabetized list of gripes. | |
35 //////////////////////////////////////////////////////////////////////////////// | |
36 | |
1 | 37 void |
21026 | 38 gripe_2_or_3_dim_plot (void) |
39 { | |
40 error ("plot: can only plot in 2 or 3 dimensions"); | |
41 } | |
42 | |
43 void | |
44 gripe_data_conversion (const char *from, const char *to) | |
45 { | |
46 error ("unable to convert from %s to %s format", from, to); | |
47 } | |
48 | |
49 void | |
50 gripe_data_file_in_path (const std::string& fcn, const std::string& file) | |
2078 | 51 { |
21026 | 52 warning_with_id ("Octave:data-file-in-path", |
53 "%s: '%s' found by searching load path", | |
54 fcn.c_str (), file.c_str ()); | |
55 } | |
56 | |
57 void | |
58 gripe_disabled_feature (const std::string& func, const std::string& feature, | |
59 const std::string& pkg /*="Octave"*/) | |
60 { | |
61 error ("%s: support for %s was disabled when %s was built", | |
62 func.c_str (), feature.c_str (), pkg.c_str ()); | |
63 } | |
64 | |
65 void | |
66 gripe_divide_by_zero (void) | |
67 { | |
68 warning_with_id ("Octave:divide-by-zero", "division by zero"); | |
69 } | |
70 | |
71 void | |
72 gripe_empty_arg (const char *name, bool is_error) | |
73 { | |
74 if (is_error) | |
75 error ("%s: empty matrix is invalid as an argument", name); | |
76 else | |
77 warning ("%s: argument is empty matrix", name); | |
2078 | 78 } |
79 | |
80 void | |
21026 | 81 gripe_implicit_conversion (const char *id, const char *from, const char *to) |
82 { | |
83 warning_with_id (id, "implicit conversion from %s to %s", from, to); | |
84 } | |
85 | |
86 void | |
87 gripe_implicit_conversion (const std::string& id, | |
88 const std::string& from, const std::string& to) | |
6890 | 89 { |
21026 | 90 warning_with_id (id.c_str (), |
91 "implicit conversion from %s to %s", | |
92 from.c_str (), to.c_str ()); | |
93 } | |
94 | |
95 void | |
96 gripe_indexed_cs_list (void) | |
97 { | |
98 error ("a cs-list cannot be further indexed"); | |
6890 | 99 } |
100 | |
101 void | |
21026 | 102 gripe_invalid_conversion (const std::string& from, const std::string& to) |
1 | 103 { |
21026 | 104 error ("invalid conversion from %s to %s", from.c_str (), to.c_str ()); |
105 } | |
106 | |
107 void | |
108 gripe_invalid_inquiry_subscript (void) | |
109 { | |
110 error ("invalid dimension inquiry of a non-existent value"); | |
1 | 111 } |
112 | |
113 void | |
21026 | 114 gripe_invalid_value_specified (const char *name) |
115 { | |
116 warning ("invalid value specified for '%s'", name); | |
117 } | |
118 | |
119 void | |
120 gripe_logical_conversion (void) | |
1 | 121 { |
21026 | 122 warning_with_id ("Octave:logical-conversion", |
123 "value not equal to 1 or 0 converted to logical 1"); | |
124 } | |
125 | |
126 void | |
127 gripe_nonbraced_cs_list_assignment (void) | |
128 { | |
129 error ("invalid assignment to cs-list outside multiple assignment"); | |
1 | 130 } |
131 | |
132 void | |
133 gripe_nonconformant (void) | |
134 { | |
135 error ("nonconformant matrices"); | |
136 } | |
137 | |
138 void | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
139 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
|
140 octave_idx_type r2, octave_idx_type c2) |
143 | 141 { |
142 error ("nonconformant matrices (op1 is %dx%d, op2 is %dx%d)", | |
10315
57a59eae83cc
untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents:
10160
diff
changeset
|
143 r1, c1, r2, c2); |
143 | 144 } |
145 | |
146 void | |
21026 | 147 gripe_not_implemented (const char *fcn) |
148 { | |
149 error ("%s: not implemented", fcn); | |
150 } | |
151 | |
152 void | |
153 gripe_not_supported (const char *fcn) | |
1 | 154 { |
21026 | 155 error ("%s: not supported on this system", fcn); |
156 } | |
157 | |
158 void | |
159 gripe_range_invalid (void) | |
160 { | |
161 error ("range constant used in invalid context"); | |
1 | 162 } |
163 | |
164 void | |
165 gripe_square_matrix_required (const char *name) | |
166 { | |
167 error ("%s: argument must be a square matrix", name); | |
168 } | |
169 | |
170 void | |
21026 | 171 gripe_string_invalid (void) |
172 { | |
173 error ("std::string constant used in invalid context"); | |
174 } | |
175 | |
176 void | |
177 gripe_unrecognized_data_fmt (const char *warn_for) | |
178 { | |
179 error ("%s: unrecognized data format requested", warn_for); | |
180 } | |
181 | |
182 void | |
183 gripe_unrecognized_float_fmt (void) | |
184 { | |
185 error ("unrecognized floating point format requested"); | |
186 } | |
187 | |
188 void | |
189 gripe_user_returned_invalid (const char *name) | |
190 { | |
191 error ("%s: user-supplied function returned invalid value", name); | |
192 } | |
193 | |
194 void | |
1 | 195 gripe_user_supplied_eval (const char *name) |
196 { | |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
197 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
198 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
199 gripe_user_supplied_eval (e, name); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
200 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
201 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
202 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
203 gripe_user_supplied_eval (octave_execution_exception& e, |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
204 const char *name) |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
205 { |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
206 error (e, "%s: evaluation of user-supplied function failed", name); |
1 | 207 } |
208 | |
209 void | |
21026 | 210 gripe_warn_complex_cmp (void) |
777 | 211 { |
21026 | 212 warning_with_id ("Octave:language-extension", |
213 "comparing complex numbers is not supported in Matlab"); | |
777 | 214 } |
215 | |
216 void | |
5602 | 217 gripe_wrong_type_arg (const char *name, const char *s, bool is_error) |
2668 | 218 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
219 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
220 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
221 gripe_wrong_type_arg (e, name, s, is_error); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
222 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
223 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
224 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
225 gripe_wrong_type_arg (octave_execution_exception& e, |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
226 const char *name, const char *s, bool is_error) |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
227 { |
2799 | 228 if (is_error) |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
229 error (e, "%s: wrong type argument '%s'", name, s); |
2799 | 230 else |
15466
d174210ce1ec
use ' instead of ` in error messages, warnings and most comments
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
231 warning ("%s: wrong type argument '%s'", name, s); |
5602 | 232 } |
233 | |
234 void | |
235 gripe_wrong_type_arg (const char *name, const std::string& s, bool is_error) | |
236 { | |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
237 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
238 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
239 gripe_wrong_type_arg (e, name, s.c_str (), is_error); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
240 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
241 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
242 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
243 gripe_wrong_type_arg (octave_execution_exception& e, |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
244 const char *name, const std::string& s, bool is_error) |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
245 { |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
246 gripe_wrong_type_arg (e, name, s.c_str (), is_error); |
2668 | 247 } |
248 | |
249 void | |
2799 | 250 gripe_wrong_type_arg (const char *name, const octave_value& tc, |
10315
57a59eae83cc
untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents:
10160
diff
changeset
|
251 bool is_error) |
777 | 252 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
253 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
254 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
255 gripe_wrong_type_arg (e, name, tc, is_error); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
256 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
257 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
258 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
259 gripe_wrong_type_arg (octave_execution_exception& e, |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
260 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
|
261 bool is_error) |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
262 { |
3523 | 263 std::string type = tc.type_name (); |
2799 | 264 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
265 gripe_wrong_type_arg (e, name, type, is_error); |
777 | 266 } |
267 | |
268 void | |
7352 | 269 gripe_wrong_type_arg (const std::string& name, const octave_value& tc, |
10315
57a59eae83cc
untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents:
10160
diff
changeset
|
270 bool is_error) |
7352 | 271 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
272 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
273 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
274 gripe_wrong_type_arg (e, name, tc, is_error); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
275 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
276 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
277 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
278 gripe_wrong_type_arg (octave_execution_exception& e, |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
279 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
|
280 bool is_error) |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
281 { |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
282 gripe_wrong_type_arg (e, name.c_str (), tc, is_error); |
7352 | 283 } |
284 | |
285 void | |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
286 gripe_wrong_type_arg (const char *s, bool is_error) |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
287 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
288 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
289 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
290 gripe_wrong_type_arg (e, s, is_error); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
291 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
292 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
293 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
294 gripe_wrong_type_arg (octave_execution_exception& e, |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
295 const char *s, bool is_error) |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
296 { |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
297 if (is_error) |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
298 error (e, "wrong type argument '%s'", s); |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
299 else |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
300 warning ("wrong type argument '%s'", s); |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
301 } |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
302 |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
303 void |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
304 gripe_wrong_type_arg (const std::string& s, bool is_error) |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
305 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
306 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
307 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
308 gripe_wrong_type_arg (e, s, is_error); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
309 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
310 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
311 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
312 gripe_wrong_type_arg (octave_execution_exception& e, |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
313 const std::string& s, bool is_error) |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
314 { |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
315 gripe_wrong_type_arg (e, s.c_str (), is_error); |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
316 } |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
317 |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
318 void |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
319 gripe_wrong_type_arg (const octave_value& tc, bool is_error) |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
320 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
321 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
322 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
323 gripe_wrong_type_arg (e, tc, is_error); |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
324 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
325 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
326 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
327 gripe_wrong_type_arg (octave_execution_exception& e, |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
328 const octave_value& tc, bool is_error) |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
329 { |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
330 std::string type = tc.type_name (); |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
331 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
332 gripe_wrong_type_arg (e, type, is_error); |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
333 } |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
334 |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
335 void |
2086 | 336 gripe_wrong_type_arg_for_binary_op (const octave_value& op) |
777 | 337 { |
3523 | 338 std::string type = op.type_name (); |
15466
d174210ce1ec
use ' instead of ` in error messages, warnings and most comments
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
339 error ("invalid operand '%s' for binary operator", type.c_str ()); |
2374 | 340 } |
341 | |
342 void | |
21026 | 343 gripe_wrong_type_arg_for_unary_op (const octave_value& op) |
4452 | 344 { |
21026 | 345 std::string type = op.type_name (); |
346 error ("invalid operand '%s' for unary operator", type.c_str ()); | |
8579
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8039
diff
changeset
|
347 } |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8039
diff
changeset
|
348 |