Mercurial > octave-nkf
annotate src/gripes.h @ 10030:83bb2a78c07d
improve simple assignments error checks and messages
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Sat, 26 Dec 2009 14:07:50 +0100 |
parents | 11844593875a |
children | cd96d29c5efa |
rev | line source |
---|---|
1 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000, 2003, 2005, 2006, |
8920 | 4 2007, 2008, 2009 John W. Eaton |
1 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
1 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
1 | 21 |
22 */ | |
23 | |
383 | 24 #if !defined (octave_gripes_h) |
25 #define octave_gripes_h 1 | |
1 | 26 |
2374 | 27 #include <string> |
28 | |
2086 | 29 class octave_value; |
620 | 30 |
6109 | 31 extern OCTINTERP_API void |
2799 | 32 gripe_not_supported (const char *); |
33 | |
6109 | 34 extern OCTINTERP_API void |
6890 | 35 gripe_not_implemented (const char *); |
36 | |
37 extern OCTINTERP_API void | |
2799 | 38 gripe_string_invalid (void); |
39 | |
6109 | 40 extern OCTINTERP_API void |
2799 | 41 gripe_range_invalid (void); |
42 | |
6109 | 43 extern OCTINTERP_API void |
2799 | 44 gripe_nonconformant (void); |
45 | |
6109 | 46 extern OCTINTERP_API void |
5275 | 47 gripe_nonconformant (octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2); |
2799 | 48 |
6109 | 49 extern OCTINTERP_API void |
2799 | 50 gripe_empty_arg (const char *name, bool is_error); |
51 | |
6109 | 52 extern OCTINTERP_API void |
2799 | 53 gripe_square_matrix_required (const char *name); |
54 | |
6109 | 55 extern OCTINTERP_API void |
2799 | 56 gripe_user_supplied_eval (const char *name); |
57 | |
6109 | 58 extern OCTINTERP_API void |
2799 | 59 gripe_user_returned_invalid (const char *name); |
60 | |
6109 | 61 extern OCTINTERP_API void |
3523 | 62 gripe_invalid_conversion (const std::string& from, const std::string& to); |
2799 | 63 |
6109 | 64 extern OCTINTERP_API void |
2799 | 65 gripe_invalid_value_specified (const char *name); |
66 | |
6109 | 67 extern OCTINTERP_API void |
2799 | 68 gripe_2_or_3_dim_plot (void); |
69 | |
6109 | 70 extern OCTINTERP_API void |
2799 | 71 gripe_unrecognized_float_fmt (void); |
72 | |
6109 | 73 extern OCTINTERP_API void |
2799 | 74 gripe_unrecognized_data_fmt (const char *warn_for); |
75 | |
6109 | 76 extern OCTINTERP_API void |
2799 | 77 gripe_data_conversion (const char *from, const char *to); |
78 | |
6109 | 79 extern OCTINTERP_API void |
5602 | 80 gripe_wrong_type_arg (const char *name, const char *s, |
81 bool is_error = true); | |
82 | |
6109 | 83 extern OCTINTERP_API void |
3523 | 84 gripe_wrong_type_arg (const char *name, const std::string& s, |
2799 | 85 bool is_error = true); |
86 | |
6109 | 87 extern OCTINTERP_API void |
2799 | 88 gripe_wrong_type_arg (const char *name, const octave_value& tc, |
89 bool is_error = true); | |
90 | |
6109 | 91 extern OCTINTERP_API void |
7352 | 92 gripe_wrong_type_arg (const std::string& name, const octave_value& tc, |
93 bool is_error = true); | |
94 | |
95 extern OCTINTERP_API void | |
2799 | 96 gripe_wrong_type_arg_for_unary_op (const octave_value& op); |
97 | |
6109 | 98 extern OCTINTERP_API void |
2799 | 99 gripe_wrong_type_arg_for_binary_op (const octave_value& op); |
100 | |
6109 | 101 extern OCTINTERP_API void |
5781 | 102 gripe_implicit_conversion (const char *id, const char *from, const char *to); |
2799 | 103 |
6109 | 104 extern OCTINTERP_API void |
5781 | 105 gripe_implicit_conversion (const std::string& id, const std::string& from, |
106 const std::string& to); | |
4452 | 107 |
6109 | 108 extern OCTINTERP_API void |
7997
2b8952e133c9
implement checked conversions between integers
Jaroslav Hajek <highegg@gmail.com>
parents:
7352
diff
changeset
|
109 gripe_truncated_conversion (const char *srctype, const char *desttype); |
2b8952e133c9
implement checked conversions between integers
Jaroslav Hajek <highegg@gmail.com>
parents:
7352
diff
changeset
|
110 |
2b8952e133c9
implement checked conversions between integers
Jaroslav Hajek <highegg@gmail.com>
parents:
7352
diff
changeset
|
111 extern OCTINTERP_API void |
8039
cd90e2842080
Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
8011
diff
changeset
|
112 gripe_binop_integer_math_truncated (const char *op, const char *type1, const char *type2); |
cd90e2842080
Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
8011
diff
changeset
|
113 |
cd90e2842080
Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
8011
diff
changeset
|
114 extern OCTINTERP_API void |
8780
ea76466605ba
support native cumsum, gripe on overflow in sum/cumsum
Jaroslav Hajek <highegg@gmail.com>
parents:
8579
diff
changeset
|
115 gripe_native_integer_math_truncated (const char *fcn, const char *type); |
ea76466605ba
support native cumsum, gripe on overflow in sum/cumsum
Jaroslav Hajek <highegg@gmail.com>
parents:
8579
diff
changeset
|
116 |
ea76466605ba
support native cumsum, gripe on overflow in sum/cumsum
Jaroslav Hajek <highegg@gmail.com>
parents:
8579
diff
changeset
|
117 extern OCTINTERP_API void |
8039
cd90e2842080
Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
8011
diff
changeset
|
118 gripe_unop_integer_math_truncated (const char *op, const char *type); |
cd90e2842080
Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
8011
diff
changeset
|
119 |
cd90e2842080
Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
8011
diff
changeset
|
120 extern OCTINTERP_API void |
cd90e2842080
Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
8011
diff
changeset
|
121 gripe_non_integer_conversion (const char *srctype, const char *desttype); |
cd90e2842080
Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
8011
diff
changeset
|
122 |
cd90e2842080
Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
8011
diff
changeset
|
123 extern OCTINTERP_API void |
cd90e2842080
Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
8011
diff
changeset
|
124 gripe_nan_conversion (const char *srctype, const char *desttype); |
cd90e2842080
Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
8011
diff
changeset
|
125 |
cd90e2842080
Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents:
8011
diff
changeset
|
126 extern OCTINTERP_API void |
2799 | 127 gripe_divide_by_zero (void); |
1 | 128 |
6109 | 129 extern OCTINTERP_API void |
5943 | 130 gripe_logical_conversion (void); |
131 | |
8011
3100283874d7
improve backtrace error messages
John W. Eaton <jwe@octave.org>
parents:
7997
diff
changeset
|
132 extern OCTINTERP_API void |
3100283874d7
improve backtrace error messages
John W. Eaton <jwe@octave.org>
parents:
7997
diff
changeset
|
133 gripe_library_execution_error (void); |
3100283874d7
improve backtrace error messages
John W. Eaton <jwe@octave.org>
parents:
7997
diff
changeset
|
134 |
8579
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8039
diff
changeset
|
135 extern OCTINTERP_API void |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8039
diff
changeset
|
136 gripe_invalid_inquiry_subscript (void); |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8039
diff
changeset
|
137 |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8039
diff
changeset
|
138 extern OCTINTERP_API void |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8039
diff
changeset
|
139 gripe_indexed_cs_list (void); |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8039
diff
changeset
|
140 |
9588
319e2ab9b8ae
warn about the complex comparison ops
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
141 extern OCTINTERP_API void |
10030
83bb2a78c07d
improve simple assignments error checks and messages
Jaroslav Hajek <highegg@gmail.com>
parents:
9648
diff
changeset
|
142 gripe_nonbraced_cs_list_assignment (void); |
83bb2a78c07d
improve simple assignments error checks and messages
Jaroslav Hajek <highegg@gmail.com>
parents:
9648
diff
changeset
|
143 |
83bb2a78c07d
improve simple assignments error checks and messages
Jaroslav Hajek <highegg@gmail.com>
parents:
9648
diff
changeset
|
144 extern OCTINTERP_API void |
9588
319e2ab9b8ae
warn about the complex comparison ops
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
145 gripe_warn_complex_cmp (void); |
319e2ab9b8ae
warn about the complex comparison ops
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
146 |
1 | 147 #endif |
148 | |
149 /* | |
150 ;;; Local Variables: *** | |
151 ;;; mode: C++ *** | |
152 ;;; End: *** | |
153 */ |