Mercurial > octave
annotate libinterp/corefcn/gripes.cc @ 21082:4484384a2959
Deprecate gripe_not_supported.
* gripes.h (gripe_not_supported): Mark with OCTAVE_DEPRECATED.
Add FIXME note with date of deprecation and scheduled removal.
* gripes.cc (gripe_not_supported): Add FIXME note with date of deprecation and
scheduled removal.
* __glpk__.cc (Fglpk): Replace gripe_not_supported with gripe_disabled_feature.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 16 Jan 2016 15:33:45 -0800 |
parents | 397f6ee4a35d |
children | 2e8aea678f2a |
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 | |
21081
397f6ee4a35d
Extend msg from gripe_disabled_feature to handle case where libraries not available.
Rik <rik@octave.org>
parents:
21026
diff
changeset
|
58 gripe_disabled_feature (const std::string& fcn, const std::string& feature, |
21026 | 59 const std::string& pkg /*="Octave"*/) |
60 { | |
21081
397f6ee4a35d
Extend msg from gripe_disabled_feature to handle case where libraries not available.
Rik <rik@octave.org>
parents:
21026
diff
changeset
|
61 error ("%s: support for %s was unavailable or disabled when %s was built", |
397f6ee4a35d
Extend msg from gripe_disabled_feature to handle case where libraries not available.
Rik <rik@octave.org>
parents:
21026
diff
changeset
|
62 fcn.c_str (), feature.c_str (), pkg.c_str ()); |
21026 | 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 | |
21082 | 152 // FIXME: Deprecated in 4.2, remove in 4.6 |
21026 | 153 void |
154 gripe_not_supported (const char *fcn) | |
1 | 155 { |
21026 | 156 error ("%s: not supported on this system", fcn); |
157 } | |
158 | |
159 void | |
160 gripe_range_invalid (void) | |
161 { | |
162 error ("range constant used in invalid context"); | |
1 | 163 } |
164 | |
165 void | |
166 gripe_square_matrix_required (const char *name) | |
167 { | |
168 error ("%s: argument must be a square matrix", name); | |
169 } | |
170 | |
171 void | |
21026 | 172 gripe_string_invalid (void) |
173 { | |
174 error ("std::string constant used in invalid context"); | |
175 } | |
176 | |
177 void | |
178 gripe_unrecognized_data_fmt (const char *warn_for) | |
179 { | |
180 error ("%s: unrecognized data format requested", warn_for); | |
181 } | |
182 | |
183 void | |
184 gripe_unrecognized_float_fmt (void) | |
185 { | |
186 error ("unrecognized floating point format requested"); | |
187 } | |
188 | |
189 void | |
190 gripe_user_returned_invalid (const char *name) | |
191 { | |
192 error ("%s: user-supplied function returned invalid value", name); | |
193 } | |
194 | |
195 void | |
1 | 196 gripe_user_supplied_eval (const char *name) |
197 { | |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
198 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
199 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
200 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
|
201 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
202 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
203 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
204 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
|
205 const char *name) |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
206 { |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
207 error (e, "%s: evaluation of user-supplied function failed", name); |
1 | 208 } |
209 | |
210 void | |
21026 | 211 gripe_warn_complex_cmp (void) |
777 | 212 { |
21026 | 213 warning_with_id ("Octave:language-extension", |
214 "comparing complex numbers is not supported in Matlab"); | |
777 | 215 } |
216 | |
217 void | |
5602 | 218 gripe_wrong_type_arg (const char *name, const char *s, bool is_error) |
2668 | 219 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
220 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
221 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
222 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
|
223 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
224 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
225 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
226 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
|
227 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
|
228 { |
2799 | 229 if (is_error) |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
230 error (e, "%s: wrong type argument '%s'", name, s); |
2799 | 231 else |
15466
d174210ce1ec
use ' instead of ` in error messages, warnings and most comments
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
232 warning ("%s: wrong type argument '%s'", name, s); |
5602 | 233 } |
234 | |
235 void | |
236 gripe_wrong_type_arg (const char *name, const std::string& s, bool is_error) | |
237 { | |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
238 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
239 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
240 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
|
241 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
242 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
243 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
244 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
|
245 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
|
246 { |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
247 gripe_wrong_type_arg (e, name, s.c_str (), is_error); |
2668 | 248 } |
249 | |
250 void | |
2799 | 251 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
|
252 bool is_error) |
777 | 253 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
254 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
255 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
256 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
|
257 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
258 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
259 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
260 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
|
261 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
|
262 bool is_error) |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
263 { |
3523 | 264 std::string type = tc.type_name (); |
2799 | 265 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
266 gripe_wrong_type_arg (e, name, type, is_error); |
777 | 267 } |
268 | |
269 void | |
7352 | 270 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
|
271 bool is_error) |
7352 | 272 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
273 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
274 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
275 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
|
276 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
277 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
278 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
279 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
|
280 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
|
281 bool is_error) |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
282 { |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
283 gripe_wrong_type_arg (e, name.c_str (), tc, is_error); |
7352 | 284 } |
285 | |
286 void | |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
287 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
|
288 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
289 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
290 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
291 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
|
292 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
293 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
294 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
295 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
|
296 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
|
297 { |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
298 if (is_error) |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
299 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
|
300 else |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
301 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
|
302 } |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
303 |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
304 void |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
305 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
|
306 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
307 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
308 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
309 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
|
310 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
311 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
312 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
313 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
|
314 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
|
315 { |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
316 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
|
317 } |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
318 |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
319 void |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
320 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
|
321 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
322 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
323 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
324 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
|
325 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
326 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
327 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
328 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
|
329 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
|
330 { |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
331 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
|
332 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
333 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
|
334 } |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
335 |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
336 void |
2086 | 337 gripe_wrong_type_arg_for_binary_op (const octave_value& op) |
777 | 338 { |
3523 | 339 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
|
340 error ("invalid operand '%s' for binary operator", type.c_str ()); |
2374 | 341 } |
342 | |
343 void | |
21026 | 344 gripe_wrong_type_arg_for_unary_op (const octave_value& op) |
4452 | 345 { |
21026 | 346 std::string type = op.type_name (); |
347 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
|
348 } |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8039
diff
changeset
|
349 |