annotate libinterp/corefcn/gripes.cc @ 21101:2e8aea678f2a

Deprecate gripe_XXX functions. * NEWS: Announce deprecation. * gripes.h: Add OCTAVE_DEPRECATED attribute to all functions. Add FIXME note about removal in 4.6. * gripes.cc: Add FIXME note about removal in 4.6. * lo-array-gripes.h: Add OCTAVE_DEPRECATED attribute to all functions. Add FIXME note about removal in 4.6. * lo-array-gripes.cc: Add FIXME note about removal in 4.6.
author Rik <rik@octave.org>
date Mon, 18 Jan 2016 19:23:56 -0800
parents 4484384a2959
children 95da3bc8a281
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
1 /*
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
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
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
4
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
6
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6890
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6890
diff changeset
10 option) any later version.
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
11
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
15 for more details.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
16
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6890
diff changeset
18 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6890
diff changeset
19 <http://www.gnu.org/licenses/>.
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
20
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
21 */
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
22
21101
2e8aea678f2a Deprecate gripe_XXX functions.
Rik <rik@octave.org>
parents: 21082
diff changeset
23 // FIXME: All gripe_XXX functions deprecated in 4.2. Remove file in 4.6
2e8aea678f2a Deprecate gripe_XXX functions.
Rik <rik@octave.org>
parents: 21082
diff changeset
24
240
a99f28f5e351 [project @ 1993-11-30 20:24:36 by jwe]
jwe
parents: 143
diff changeset
25 #ifdef HAVE_CONFIG_H
1192
b6360f2d4fa6 [project @ 1995-03-30 21:38:35 by jwe]
jwe
parents: 1009
diff changeset
26 #include <config.h>
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
27 #endif
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
28
5755
ca40a52804f4 [project @ 2006-04-12 18:27:47 by jwe]
jwe
parents: 5602
diff changeset
29 #include "defun.h"
1352
19c10b8657d5 [project @ 1995-09-05 08:11:57 by jwe]
jwe
parents: 1315
diff changeset
30 #include "error.h"
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
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
ca40a52804f4 [project @ 2006-04-12 18:27:47 by jwe]
jwe
parents: 5602
diff changeset
33 #include "utils.h"
ca40a52804f4 [project @ 2006-04-12 18:27:47 by jwe]
jwe
parents: 5602
diff changeset
34
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
35 ////////////////////////////////////////////////////////////////////////////////
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
36 // Alphabetized list of gripes.
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
37 ////////////////////////////////////////////////////////////////////////////////
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
38
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
39 void
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
40 gripe_2_or_3_dim_plot (void)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
41 {
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
42 error ("plot: can only plot in 2 or 3 dimensions");
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
43 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
44
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
45 void
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
46 gripe_data_conversion (const char *from, const char *to)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
47 {
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
48 error ("unable to convert from %s to %s format", from, to);
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
49 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
50
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
51 void
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
52 gripe_data_file_in_path (const std::string& fcn, const std::string& file)
2078
4d43f960f2cc [project @ 1996-04-24 01:12:59 by jwe]
jwe
parents: 1996
diff changeset
53 {
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
54 warning_with_id ("Octave:data-file-in-path",
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
55 "%s: '%s' found by searching load path",
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
56 fcn.c_str (), file.c_str ());
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
57 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
58
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
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
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
61 const std::string& pkg /*="Octave"*/)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
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
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
65 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
66
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
67 void
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
68 gripe_divide_by_zero (void)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
69 {
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
70 warning_with_id ("Octave:divide-by-zero", "division by zero");
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
71 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
72
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
73 void
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
74 gripe_empty_arg (const char *name, bool is_error)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
75 {
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
76 if (is_error)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
77 error ("%s: empty matrix is invalid as an argument", name);
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
78 else
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
79 warning ("%s: argument is empty matrix", name);
2078
4d43f960f2cc [project @ 1996-04-24 01:12:59 by jwe]
jwe
parents: 1996
diff changeset
80 }
4d43f960f2cc [project @ 1996-04-24 01:12:59 by jwe]
jwe
parents: 1996
diff changeset
81
4d43f960f2cc [project @ 1996-04-24 01:12:59 by jwe]
jwe
parents: 1996
diff changeset
82 void
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
83 gripe_implicit_conversion (const char *id, const char *from, const char *to)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
84 {
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
85 warning_with_id (id, "implicit conversion from %s to %s", from, to);
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
86 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
87
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
88 void
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
89 gripe_implicit_conversion (const std::string& id,
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
90 const std::string& from, const std::string& to)
6890
b2b7526a5772 [project @ 2007-09-12 20:14:35 by jwe]
jwe
parents: 5943
diff changeset
91 {
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
92 warning_with_id (id.c_str (),
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
93 "implicit conversion from %s to %s",
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
94 from.c_str (), to.c_str ());
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
95 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
96
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
97 void
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
98 gripe_indexed_cs_list (void)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
99 {
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
100 error ("a cs-list cannot be further indexed");
6890
b2b7526a5772 [project @ 2007-09-12 20:14:35 by jwe]
jwe
parents: 5943
diff changeset
101 }
b2b7526a5772 [project @ 2007-09-12 20:14:35 by jwe]
jwe
parents: 5943
diff changeset
102
b2b7526a5772 [project @ 2007-09-12 20:14:35 by jwe]
jwe
parents: 5943
diff changeset
103 void
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
104 gripe_invalid_conversion (const std::string& from, const std::string& to)
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
105 {
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
106 error ("invalid conversion from %s to %s", from.c_str (), to.c_str ());
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
107 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
108
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
109 void
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
110 gripe_invalid_inquiry_subscript (void)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
111 {
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
112 error ("invalid dimension inquiry of a non-existent value");
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
113 }
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
114
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
115 void
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
116 gripe_invalid_value_specified (const char *name)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
117 {
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
118 warning ("invalid value specified for '%s'", name);
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
119 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
120
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
121 void
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
122 gripe_logical_conversion (void)
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
123 {
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
124 warning_with_id ("Octave:logical-conversion",
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
125 "value not equal to 1 or 0 converted to logical 1");
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
126 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
127
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
128 void
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
129 gripe_nonbraced_cs_list_assignment (void)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
130 {
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
131 error ("invalid assignment to cs-list outside multiple assignment");
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
132 }
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
133
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
134 void
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
135 gripe_nonconformant (void)
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
136 {
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
137 error ("nonconformant matrices");
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
138 }
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
139
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
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
7849db4b6dbc [project @ 1993-10-04 02:36:45 by jwe]
jwe
parents: 1
diff changeset
143 {
7849db4b6dbc [project @ 1993-10-04 02:36:45 by jwe]
jwe
parents: 1
diff changeset
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
7849db4b6dbc [project @ 1993-10-04 02:36:45 by jwe]
jwe
parents: 1
diff changeset
146 }
7849db4b6dbc [project @ 1993-10-04 02:36:45 by jwe]
jwe
parents: 1
diff changeset
147
7849db4b6dbc [project @ 1993-10-04 02:36:45 by jwe]
jwe
parents: 1
diff changeset
148 void
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
149 gripe_not_implemented (const char *fcn)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
150 {
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
151 error ("%s: not implemented", fcn);
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
152 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
153
21082
4484384a2959 Deprecate gripe_not_supported.
Rik <rik@octave.org>
parents: 21081
diff changeset
154 // FIXME: Deprecated in 4.2, remove in 4.6
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
155 void
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
156 gripe_not_supported (const char *fcn)
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
157 {
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
158 error ("%s: not supported on this system", fcn);
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
159 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
160
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
161 void
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
162 gripe_range_invalid (void)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
163 {
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
164 error ("range constant used in invalid context");
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
165 }
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
166
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
167 void
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
168 gripe_square_matrix_required (const char *name)
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
169 {
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
170 error ("%s: argument must be a square matrix", name);
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
171 }
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
172
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
173 void
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
174 gripe_string_invalid (void)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
175 {
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
176 error ("std::string constant used in invalid context");
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
177 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
178
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
179 void
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
180 gripe_unrecognized_data_fmt (const char *warn_for)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
181 {
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
182 error ("%s: unrecognized data format requested", warn_for);
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
183 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
184
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
185 void
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
186 gripe_unrecognized_float_fmt (void)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
187 {
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
188 error ("unrecognized floating point format requested");
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
189 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
190
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
191 void
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
192 gripe_user_returned_invalid (const char *name)
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
193 {
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
194 error ("%s: user-supplied function returned invalid value", name);
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
195 }
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
196
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
197 void
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
198 gripe_user_supplied_eval (const char *name)
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
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
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
202 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
203 }
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
204
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
205 void
20785
b6f2909e7f94 always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents: 20756
diff changeset
206 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
207 const char *name)
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
208 {
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
209 error (e, "%s: evaluation of user-supplied function failed", name);
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
210 }
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
211
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
212 void
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
213 gripe_warn_complex_cmp (void)
777
a2f9d3fd720c [project @ 1994-10-07 14:01:53 by jwe]
jwe
parents: 628
diff changeset
214 {
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
215 warning_with_id ("Octave:language-extension",
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
216 "comparing complex numbers is not supported in Matlab");
777
a2f9d3fd720c [project @ 1994-10-07 14:01:53 by jwe]
jwe
parents: 628
diff changeset
217 }
a2f9d3fd720c [project @ 1994-10-07 14:01:53 by jwe]
jwe
parents: 628
diff changeset
218
a2f9d3fd720c [project @ 1994-10-07 14:01:53 by jwe]
jwe
parents: 628
diff changeset
219 void
5602
dfa2da0563e5 [project @ 2006-01-31 03:43:40 by jwe]
jwe
parents: 5307
diff changeset
220 gripe_wrong_type_arg (const char *name, const char *s, bool is_error)
2668
0d865ef7478f [project @ 1997-02-13 18:21:47 by jwe]
jwe
parents: 2374
diff changeset
221 {
20756
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
222 octave_execution_exception e;
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 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
225 }
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
226
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
227 void
20785
b6f2909e7f94 always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents: 20756
diff changeset
228 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
229 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
230 {
2799
d77a29e4387f [project @ 1997-03-08 08:35:56 by jwe]
jwe
parents: 2676
diff changeset
231 if (is_error)
20756
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
232 error (e, "%s: wrong type argument '%s'", name, s);
2799
d77a29e4387f [project @ 1997-03-08 08:35:56 by jwe]
jwe
parents: 2676
diff changeset
233 else
15466
d174210ce1ec use ' instead of ` in error messages, warnings and most comments
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
234 warning ("%s: wrong type argument '%s'", name, s);
5602
dfa2da0563e5 [project @ 2006-01-31 03:43:40 by jwe]
jwe
parents: 5307
diff changeset
235 }
dfa2da0563e5 [project @ 2006-01-31 03:43:40 by jwe]
jwe
parents: 5307
diff changeset
236
dfa2da0563e5 [project @ 2006-01-31 03:43:40 by jwe]
jwe
parents: 5307
diff changeset
237 void
dfa2da0563e5 [project @ 2006-01-31 03:43:40 by jwe]
jwe
parents: 5307
diff changeset
238 gripe_wrong_type_arg (const char *name, const std::string& s, bool is_error)
dfa2da0563e5 [project @ 2006-01-31 03:43:40 by jwe]
jwe
parents: 5307
diff changeset
239 {
20756
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
240 octave_execution_exception e;
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 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
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 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
248 {
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
249 gripe_wrong_type_arg (e, name, s.c_str (), is_error);
2668
0d865ef7478f [project @ 1997-02-13 18:21:47 by jwe]
jwe
parents: 2374
diff changeset
250 }
0d865ef7478f [project @ 1997-02-13 18:21:47 by jwe]
jwe
parents: 2374
diff changeset
251
0d865ef7478f [project @ 1997-02-13 18:21:47 by jwe]
jwe
parents: 2374
diff changeset
252 void
2799
d77a29e4387f [project @ 1997-03-08 08:35:56 by jwe]
jwe
parents: 2676
diff changeset
253 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
254 bool is_error)
777
a2f9d3fd720c [project @ 1994-10-07 14:01:53 by jwe]
jwe
parents: 628
diff changeset
255 {
20756
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
256 octave_execution_exception e;
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 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
259 }
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
260
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
261 void
20785
b6f2909e7f94 always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents: 20756
diff changeset
262 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
263 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
264 bool is_error)
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
265 {
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 2847
diff changeset
266 std::string type = tc.type_name ();
2799
d77a29e4387f [project @ 1997-03-08 08:35:56 by jwe]
jwe
parents: 2676
diff changeset
267
20756
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
268 gripe_wrong_type_arg (e, name, type, is_error);
777
a2f9d3fd720c [project @ 1994-10-07 14:01:53 by jwe]
jwe
parents: 628
diff changeset
269 }
a2f9d3fd720c [project @ 1994-10-07 14:01:53 by jwe]
jwe
parents: 628
diff changeset
270
a2f9d3fd720c [project @ 1994-10-07 14:01:53 by jwe]
jwe
parents: 628
diff changeset
271 void
7352
fab9bc33b949 [project @ 2008-01-07 18:54:45 by jwe]
jwe
parents: 7017
diff changeset
272 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
273 bool is_error)
7352
fab9bc33b949 [project @ 2008-01-07 18:54:45 by jwe]
jwe
parents: 7017
diff changeset
274 {
20756
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
275 octave_execution_exception e;
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 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
278 }
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
279
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
280 void
20785
b6f2909e7f94 always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents: 20756
diff changeset
281 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
282 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
283 bool is_error)
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
284 {
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
285 gripe_wrong_type_arg (e, name.c_str (), tc, is_error);
7352
fab9bc33b949 [project @ 2008-01-07 18:54:45 by jwe]
jwe
parents: 7017
diff changeset
286 }
fab9bc33b949 [project @ 2008-01-07 18:54:45 by jwe]
jwe
parents: 7017
diff changeset
287
fab9bc33b949 [project @ 2008-01-07 18:54:45 by jwe]
jwe
parents: 7017
diff changeset
288 void
20700
68e3a747ca02 rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
289 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
290 {
20756
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
291 octave_execution_exception e;
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 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
294 }
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
295
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
296 void
20785
b6f2909e7f94 always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents: 20756
diff changeset
297 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
298 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
299 {
20700
68e3a747ca02 rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
300 if (is_error)
20756
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
301 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
302 else
68e3a747ca02 rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
303 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
304 }
68e3a747ca02 rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
305
68e3a747ca02 rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
306 void
68e3a747ca02 rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
307 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
308 {
20756
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
309 octave_execution_exception e;
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 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
312 }
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
313
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
314 void
20785
b6f2909e7f94 always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents: 20756
diff changeset
315 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
316 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
317 {
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, 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
319 }
68e3a747ca02 rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
320
68e3a747ca02 rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
321 void
68e3a747ca02 rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
322 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
323 {
20756
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
324 octave_execution_exception e;
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 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
327 }
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
328
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
329 void
20785
b6f2909e7f94 always throw exception after debugging with debug_on_error
John W. Eaton <jwe@octave.org>
parents: 20756
diff changeset
330 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
331 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
332 {
20700
68e3a747ca02 rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
333 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
334
20756
200ae1d650b7 propagate octave_execution_exception objects through try/catch blocks
John W. Eaton <jwe@octave.org>
parents: 20700
diff changeset
335 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
336 }
68e3a747ca02 rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
337
68e3a747ca02 rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
338 void
2086
bfb775fb6fe8 [project @ 1996-04-25 05:55:19 by jwe]
jwe
parents: 2078
diff changeset
339 gripe_wrong_type_arg_for_binary_op (const octave_value& op)
777
a2f9d3fd720c [project @ 1994-10-07 14:01:53 by jwe]
jwe
parents: 628
diff changeset
340 {
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 2847
diff changeset
341 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
342 error ("invalid operand '%s' for binary operator", type.c_str ());
2374
67a18ae969d4 [project @ 1996-10-12 00:27:01 by jwe]
jwe
parents: 2086
diff changeset
343 }
67a18ae969d4 [project @ 1996-10-12 00:27:01 by jwe]
jwe
parents: 2086
diff changeset
344
67a18ae969d4 [project @ 1996-10-12 00:27:01 by jwe]
jwe
parents: 2086
diff changeset
345 void
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
346 gripe_wrong_type_arg_for_unary_op (const octave_value& op)
4452
f3c21a1d1c62 [project @ 2003-07-09 23:20:18 by jwe]
jwe
parents: 4055
diff changeset
347 {
21026
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
348 std::string type = op.type_name ();
5a340d8458d6 maint: Alphabetize list of gripes.
Rik <rik@octave.org>
parents: 20940
diff changeset
349 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
350 }
7e0f36dfefbe implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents: 8039
diff changeset
351