Mercurial > octave
annotate libinterp/corefcn/gripes.cc @ 21135:95da3bc8a281
supress deprecated function warnings in Octave code
* lo-array-gripes.cc, gripes.cc: Use GCC pragmas to suppress
deprecated function warnings.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 22 Jan 2016 13:45:21 -0500 |
parents | 2e8aea678f2a |
children | fcac5dbbf9ed |
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 | |
21101 | 23 // FIXME: All gripe_XXX functions deprecated in 4.2. Remove file in 4.6 |
24 | |
240 | 25 #ifdef HAVE_CONFIG_H |
1192 | 26 #include <config.h> |
1 | 27 #endif |
28 | |
5755 | 29 #include "defun.h" |
1352 | 30 #include "error.h" |
1 | 31 #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
|
32 #include "ovl.h" |
5755 | 33 #include "utils.h" |
34 | |
21026 | 35 //////////////////////////////////////////////////////////////////////////////// |
36 // Alphabetized list of gripes. | |
37 //////////////////////////////////////////////////////////////////////////////// | |
38 | |
1 | 39 void |
21026 | 40 gripe_2_or_3_dim_plot (void) |
41 { | |
42 error ("plot: can only plot in 2 or 3 dimensions"); | |
43 } | |
44 | |
45 void | |
46 gripe_data_conversion (const char *from, const char *to) | |
47 { | |
48 error ("unable to convert from %s to %s format", from, to); | |
49 } | |
50 | |
51 void | |
52 gripe_data_file_in_path (const std::string& fcn, const std::string& file) | |
2078 | 53 { |
21026 | 54 warning_with_id ("Octave:data-file-in-path", |
55 "%s: '%s' found by searching load path", | |
56 fcn.c_str (), file.c_str ()); | |
57 } | |
58 | |
59 void | |
21081
397f6ee4a35d
Extend msg from gripe_disabled_feature to handle case where libraries not available.
Rik <rik@octave.org>
parents:
21026
diff
changeset
|
60 gripe_disabled_feature (const std::string& fcn, const std::string& feature, |
21026 | 61 const std::string& pkg /*="Octave"*/) |
62 { | |
21081
397f6ee4a35d
Extend msg from gripe_disabled_feature to handle case where libraries not available.
Rik <rik@octave.org>
parents:
21026
diff
changeset
|
63 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
|
64 fcn.c_str (), feature.c_str (), pkg.c_str ()); |
21026 | 65 } |
66 | |
67 void | |
68 gripe_divide_by_zero (void) | |
69 { | |
70 warning_with_id ("Octave:divide-by-zero", "division by zero"); | |
71 } | |
72 | |
73 void | |
74 gripe_empty_arg (const char *name, bool is_error) | |
75 { | |
76 if (is_error) | |
77 error ("%s: empty matrix is invalid as an argument", name); | |
78 else | |
79 warning ("%s: argument is empty matrix", name); | |
2078 | 80 } |
81 | |
82 void | |
21026 | 83 gripe_implicit_conversion (const char *id, const char *from, const char *to) |
84 { | |
85 warning_with_id (id, "implicit conversion from %s to %s", from, to); | |
86 } | |
87 | |
88 void | |
89 gripe_implicit_conversion (const std::string& id, | |
90 const std::string& from, const std::string& to) | |
6890 | 91 { |
21026 | 92 warning_with_id (id.c_str (), |
93 "implicit conversion from %s to %s", | |
94 from.c_str (), to.c_str ()); | |
95 } | |
96 | |
97 void | |
98 gripe_indexed_cs_list (void) | |
99 { | |
100 error ("a cs-list cannot be further indexed"); | |
6890 | 101 } |
102 | |
103 void | |
21026 | 104 gripe_invalid_conversion (const std::string& from, const std::string& to) |
1 | 105 { |
21026 | 106 error ("invalid conversion from %s to %s", from.c_str (), to.c_str ()); |
107 } | |
108 | |
109 void | |
110 gripe_invalid_inquiry_subscript (void) | |
111 { | |
112 error ("invalid dimension inquiry of a non-existent value"); | |
1 | 113 } |
114 | |
115 void | |
21026 | 116 gripe_invalid_value_specified (const char *name) |
117 { | |
118 warning ("invalid value specified for '%s'", name); | |
119 } | |
120 | |
121 void | |
122 gripe_logical_conversion (void) | |
1 | 123 { |
21026 | 124 warning_with_id ("Octave:logical-conversion", |
125 "value not equal to 1 or 0 converted to logical 1"); | |
126 } | |
127 | |
128 void | |
129 gripe_nonbraced_cs_list_assignment (void) | |
130 { | |
131 error ("invalid assignment to cs-list outside multiple assignment"); | |
1 | 132 } |
133 | |
134 void | |
135 gripe_nonconformant (void) | |
136 { | |
137 error ("nonconformant matrices"); | |
138 } | |
139 | |
140 void | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
141 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
|
142 octave_idx_type r2, octave_idx_type c2) |
143 | 143 { |
144 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
|
145 r1, c1, r2, c2); |
143 | 146 } |
147 | |
148 void | |
21026 | 149 gripe_not_implemented (const char *fcn) |
150 { | |
151 error ("%s: not implemented", fcn); | |
152 } | |
153 | |
21082 | 154 // FIXME: Deprecated in 4.2, remove in 4.6 |
21026 | 155 void |
156 gripe_not_supported (const char *fcn) | |
1 | 157 { |
21026 | 158 error ("%s: not supported on this system", fcn); |
159 } | |
160 | |
161 void | |
162 gripe_range_invalid (void) | |
163 { | |
164 error ("range constant used in invalid context"); | |
1 | 165 } |
166 | |
167 void | |
168 gripe_square_matrix_required (const char *name) | |
169 { | |
170 error ("%s: argument must be a square matrix", name); | |
171 } | |
172 | |
173 void | |
21026 | 174 gripe_string_invalid (void) |
175 { | |
176 error ("std::string constant used in invalid context"); | |
177 } | |
178 | |
179 void | |
180 gripe_unrecognized_data_fmt (const char *warn_for) | |
181 { | |
182 error ("%s: unrecognized data format requested", warn_for); | |
183 } | |
184 | |
185 void | |
186 gripe_unrecognized_float_fmt (void) | |
187 { | |
188 error ("unrecognized floating point format requested"); | |
189 } | |
190 | |
191 void | |
192 gripe_user_returned_invalid (const char *name) | |
193 { | |
194 error ("%s: user-supplied function returned invalid value", name); | |
195 } | |
196 | |
197 void | |
1 | 198 gripe_user_supplied_eval (const char *name) |
199 { | |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
200 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
201 |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
202 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
203 #pragma GCC diagnostic push |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
204 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
205 #endif |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
206 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
207 gripe_user_supplied_eval (e, name); |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
208 |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
209 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
210 #pragma GCC diagnostic pop |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
211 #endif |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
212 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
213 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
214 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
215 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
|
216 const char *name) |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
217 { |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
218 error (e, "%s: evaluation of user-supplied function failed", name); |
1 | 219 } |
220 | |
221 void | |
21026 | 222 gripe_warn_complex_cmp (void) |
777 | 223 { |
21026 | 224 warning_with_id ("Octave:language-extension", |
225 "comparing complex numbers is not supported in Matlab"); | |
777 | 226 } |
227 | |
228 void | |
5602 | 229 gripe_wrong_type_arg (const char *name, const char *s, bool is_error) |
2668 | 230 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
231 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
232 |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
233 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
234 #pragma GCC diagnostic push |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
235 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
236 #endif |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
237 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
238 gripe_wrong_type_arg (e, name, s, is_error); |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
239 |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
240 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
241 #pragma GCC diagnostic pop |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
242 #endif |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
243 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
244 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
245 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
246 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
|
247 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
|
248 { |
2799 | 249 if (is_error) |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
250 error (e, "%s: wrong type argument '%s'", name, s); |
2799 | 251 else |
15466
d174210ce1ec
use ' instead of ` in error messages, warnings and most comments
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
252 warning ("%s: wrong type argument '%s'", name, s); |
5602 | 253 } |
254 | |
255 void | |
256 gripe_wrong_type_arg (const char *name, const std::string& s, bool is_error) | |
257 { | |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
258 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
259 |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
260 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
261 #pragma GCC diagnostic push |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
262 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
263 #endif |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
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, s.c_str (), is_error); |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
266 |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
267 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
268 #pragma GCC diagnostic pop |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
269 #endif |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
270 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
271 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
272 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
273 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
|
274 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
|
275 { |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
276 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
277 #pragma GCC diagnostic push |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
278 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
279 #endif |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
280 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
281 gripe_wrong_type_arg (e, name, s.c_str (), is_error); |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
282 |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
283 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
284 #pragma GCC diagnostic pop |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
285 #endif |
2668 | 286 } |
287 | |
288 void | |
2799 | 289 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
|
290 bool is_error) |
777 | 291 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
292 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
293 |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
294 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
295 #pragma GCC diagnostic push |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
296 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
297 #endif |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
298 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
299 gripe_wrong_type_arg (e, name, tc, is_error); |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
300 |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
301 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
302 #pragma GCC diagnostic pop |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
303 #endif |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
304 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
305 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
306 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
307 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
|
308 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
|
309 bool is_error) |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
310 { |
3523 | 311 std::string type = tc.type_name (); |
2799 | 312 |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
313 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
314 #pragma GCC diagnostic push |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
315 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
316 #endif |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
317 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
318 gripe_wrong_type_arg (e, name, type, is_error); |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
319 |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
320 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
321 #pragma GCC diagnostic pop |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
322 #endif |
777 | 323 } |
324 | |
325 void | |
7352 | 326 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
|
327 bool is_error) |
7352 | 328 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
329 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
330 |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
331 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
332 #pragma GCC diagnostic push |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
333 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
334 #endif |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
335 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
336 gripe_wrong_type_arg (e, name, tc, is_error); |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
337 |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
338 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
339 #pragma GCC diagnostic pop |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
340 #endif |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
341 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
342 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
343 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
344 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
|
345 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
|
346 bool is_error) |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
347 { |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
348 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
349 #pragma GCC diagnostic push |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
350 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
351 #endif |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
352 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
353 gripe_wrong_type_arg (e, name.c_str (), tc, is_error); |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
354 |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
355 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
356 #pragma GCC diagnostic pop |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
357 #endif |
7352 | 358 } |
359 | |
360 void | |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
361 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
|
362 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
363 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
364 |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
365 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
366 #pragma GCC diagnostic push |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
367 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
368 #endif |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
369 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
370 gripe_wrong_type_arg (e, s, is_error); |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
371 |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
372 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
373 #pragma GCC diagnostic pop |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
374 #endif |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
375 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
376 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
377 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
378 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
|
379 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
|
380 { |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
381 if (is_error) |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
382 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
|
383 else |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
384 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
|
385 } |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
386 |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
387 void |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
388 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
|
389 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
390 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
391 |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
392 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
393 #pragma GCC diagnostic push |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
394 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
395 #endif |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
396 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
397 gripe_wrong_type_arg (e, s, is_error); |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
398 |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
399 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
400 #pragma GCC diagnostic pop |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
401 #endif |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
402 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
403 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
404 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
405 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
|
406 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
|
407 { |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
408 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
409 #pragma GCC diagnostic push |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
410 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
411 #endif |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
412 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
413 gripe_wrong_type_arg (e, s.c_str (), is_error); |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
414 |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
415 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
416 #pragma GCC diagnostic pop |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
417 #endif |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
418 } |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
419 |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
420 void |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
421 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
|
422 { |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
423 octave_execution_exception e; |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
424 |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
425 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
426 #pragma GCC diagnostic push |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
427 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
428 #endif |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
429 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
430 gripe_wrong_type_arg (e, tc, is_error); |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
431 |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
432 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
433 #pragma GCC diagnostic pop |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
434 #endif |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
435 } |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
436 |
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
437 void |
20785
b6f2909e7f94
always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents:
20756
diff
changeset
|
438 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
|
439 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
|
440 { |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
441 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
|
442 |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
443 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
444 #pragma GCC diagnostic push |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
445 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
446 #endif |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
447 |
20756
200ae1d650b7
propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
448 gripe_wrong_type_arg (e, type, is_error); |
21135
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
449 |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
450 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
451 #pragma GCC diagnostic pop |
95da3bc8a281
supress deprecated function warnings in Octave code
John W. Eaton <jwe@octave.org>
parents:
21101
diff
changeset
|
452 #endif |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
453 } |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
454 |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20535
diff
changeset
|
455 void |
2086 | 456 gripe_wrong_type_arg_for_binary_op (const octave_value& op) |
777 | 457 { |
3523 | 458 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
|
459 error ("invalid operand '%s' for binary operator", type.c_str ()); |
2374 | 460 } |
461 | |
462 void | |
21026 | 463 gripe_wrong_type_arg_for_unary_op (const octave_value& op) |
4452 | 464 { |
21026 | 465 std::string type = op.type_name (); |
466 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
|
467 } |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8039
diff
changeset
|
468 |