diff src/gripes.cc @ 2374:67a18ae969d4

[project @ 1996-10-12 00:27:01 by jwe]
author jwe
date Sat, 12 Oct 1996 00:29:28 +0000
parents bfb775fb6fe8
children 0d865ef7478f
line wrap: on
line diff
--- a/src/gripes.cc	Sat Oct 12 00:22:22 1996 +0000
+++ b/src/gripes.cc	Sat Oct 12 00:29:28 1996 +0000
@@ -26,7 +26,7 @@
 
 #include "error.h"
 #include "gripes.h"
-#include "pt-const.h"
+#include "ov.h"
 
 void
 gripe_not_supported (const char *fcn)
@@ -87,9 +87,9 @@
 }
 
 void
-gripe_invalid_conversion (const char *from, const char *to)
+gripe_invalid_conversion (const string& from, const string& to)
 {
-  error ("invalid conversion from %s to %s", from, to);
+  error ("invalid conversion from %s to %s", from.c_str (), to.c_str ());
 }
 
 void
@@ -125,19 +125,35 @@
 void
 gripe_wrong_type_arg (const char *name, const octave_value& tc)
 {
-  error ("%s: wrong type argument `%s'", name, tc.type_as_string ());
+  string type = tc.type_name ();
+  error ("%s: wrong type argument `%s'", name, type.c_str ());
 }
 
 void
 gripe_wrong_type_arg_for_unary_op (const octave_value& op)
 {
-  error ("invalid operand `%s' for unary operator", op.type_as_string ());
+  string type = op.type_name ();
+  error ("invalid operand `%s' for unary operator", type.c_str ());
 }
 
 void
 gripe_wrong_type_arg_for_binary_op (const octave_value& op)
 {
-  error ("invalid operand `%s' for binary operator", op.type_as_string ());
+  string type = op.type_name ();
+  error ("invalid operand `%s' for binary operator", type.c_str ());
+}
+
+void
+gripe_implicit_conversion (const char *from, const char *to)
+{
+  warning ("implicit conversion from %s to %s", from, to);
+}
+
+void
+gripe_divide_by_zero (void)
+{
+  if (Vwarn_divide_by_zero)
+    warning ("division by zero");
 }
 
 /*