1
|
1 /* |
|
2 |
1884
|
3 Copyright (C) 1996 John W. Eaton |
1
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
1315
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1
|
20 |
|
21 */ |
|
22 |
240
|
23 #ifdef HAVE_CONFIG_H |
1192
|
24 #include <config.h> |
1
|
25 #endif |
|
26 |
1352
|
27 #include "error.h" |
1
|
28 #include "gripes.h" |
1742
|
29 #include "pt-const.h" |
1
|
30 |
|
31 void |
2078
|
32 gripe_not_supported (const char *fcn) |
|
33 { |
|
34 error ("%s: not supported on this system", fcn); |
|
35 } |
|
36 |
|
37 void |
1
|
38 gripe_string_invalid (void) |
|
39 { |
|
40 error ("string constant used in invalid context"); |
|
41 } |
|
42 |
|
43 void |
|
44 gripe_range_invalid (void) |
|
45 { |
|
46 error ("range constant used in invalid context"); |
|
47 } |
|
48 |
|
49 void |
|
50 gripe_nonconformant (void) |
|
51 { |
|
52 error ("nonconformant matrices"); |
|
53 } |
|
54 |
|
55 void |
143
|
56 gripe_nonconformant (int r1, int c1, int r2, int c2) |
|
57 { |
|
58 error ("nonconformant matrices (op1 is %dx%d, op2 is %dx%d)", |
|
59 r1, c1, r2, c2); |
|
60 } |
|
61 |
|
62 void |
1
|
63 gripe_empty_arg (const char *name, int is_error) |
|
64 { |
|
65 if (is_error) |
|
66 error ("%s: empty matrix is invalid as an argument", name); |
|
67 else |
|
68 warning ("%s: argument is empty matrix", name); |
|
69 } |
|
70 |
|
71 void |
|
72 gripe_square_matrix_required (const char *name) |
|
73 { |
|
74 error ("%s: argument must be a square matrix", name); |
|
75 } |
|
76 |
|
77 void |
|
78 gripe_user_supplied_eval (const char *name) |
|
79 { |
|
80 error ("%s: evaluation of user-supplied function failed", name); |
|
81 } |
|
82 |
|
83 void |
|
84 gripe_user_returned_invalid (const char *name) |
|
85 { |
|
86 error ("%s: user-supplied function returned invalid value", name); |
|
87 } |
|
88 |
628
|
89 void |
|
90 gripe_invalid_conversion (const char *from, const char *to) |
|
91 { |
|
92 error ("invalid conversion from %s to %s", from, to); |
|
93 } |
|
94 |
777
|
95 void |
1416
|
96 gripe_invalid_value_specified (const char *name) |
|
97 { |
|
98 warning ("invalid value specified for `%s'", name); |
|
99 } |
|
100 |
|
101 void |
777
|
102 gripe_2_or_3_dim_plot (void) |
|
103 { |
|
104 error ("plot: can only plot in 2 or 3 dimensions"); |
|
105 } |
|
106 |
|
107 void |
|
108 gripe_unrecognized_float_fmt (void) |
|
109 { |
|
110 error ("unrecognized floating point format requested"); |
|
111 } |
|
112 |
|
113 void |
|
114 gripe_unrecognized_data_fmt (const char *warn_for) |
|
115 { |
|
116 error ("%s: unrecognized data format requested", warn_for); |
|
117 } |
|
118 |
|
119 void |
|
120 gripe_data_conversion (const char *from, const char *to) |
|
121 { |
|
122 error ("unable to convert from %s to %s format", from, to); |
|
123 } |
|
124 |
|
125 void |
2086
|
126 gripe_wrong_type_arg (const char *name, const octave_value& tc) |
777
|
127 { |
|
128 error ("%s: wrong type argument `%s'", name, tc.type_as_string ()); |
|
129 } |
|
130 |
|
131 void |
2086
|
132 gripe_wrong_type_arg_for_unary_op (const octave_value& op) |
777
|
133 { |
|
134 error ("invalid operand `%s' for unary operator", op.type_as_string ()); |
|
135 } |
|
136 |
|
137 void |
2086
|
138 gripe_wrong_type_arg_for_binary_op (const octave_value& op) |
777
|
139 { |
|
140 error ("invalid operand `%s' for binary operator", op.type_as_string ()); |
|
141 } |
|
142 |
1
|
143 /* |
|
144 ;;; Local Variables: *** |
|
145 ;;; mode: C++ *** |
|
146 ;;; End: *** |
|
147 */ |