annotate libinterp/corefcn/gripes.cc @ 21082:4484384a2959

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