diff src/gripes.cc @ 2799:d77a29e4387f

[project @ 1997-03-08 08:35:56 by jwe]
author jwe
date Sat, 08 Mar 1997 08:41:00 +0000
parents a5a300c61159
children 8b262e771614
line wrap: on
line diff
--- a/src/gripes.cc	Sat Mar 08 05:09:11 1997 +0000
+++ b/src/gripes.cc	Sat Mar 08 08:41:00 1997 +0000
@@ -60,7 +60,7 @@
 }
 
 void
-gripe_empty_arg (const char *name, int is_error)
+gripe_empty_arg (const char *name, bool is_error)
 {
   if (is_error)
     error ("%s: empty matrix is invalid as an argument", name);
@@ -123,16 +123,24 @@
 }
 
 void
-gripe_wrong_type_arg (const char *name, const string& s)
+gripe_wrong_type_arg (const char *name, const string& s, bool is_error)
 {
-  error ("%s: wrong type argument `%s'", name, s.c_str ());
+  if (is_error)
+    error ("%s: wrong type argument `%s'", name, s.c_str ());
+  else
+    warning ("%s: wrong type argument `%s'", name, s.c_str ());
 }
 
 void
-gripe_wrong_type_arg (const char *name, const octave_value& tc)
+gripe_wrong_type_arg (const char *name, const octave_value& tc,
+		      bool is_error)
 {
   string type = tc.type_name ();
-  error ("%s: wrong type argument `%s'", name, type.c_str ());
+
+  if (is_error)
+    error ("%s: wrong type argument `%s'", name, type.c_str ());
+  else
+    warning ("%s: wrong type argument `%s'", name, type.c_str ());
 }
 
 void