diff libinterp/corefcn/utils.cc @ 19948:67f2c76f9f4d

Remove unnecessary checking of error_state after is_string validation. * data.cc (#NATIVE_REDUCTION, Fcumsum, Fprod, Fsum): Remove if (error_state) check. * debug.cc (Fdbstep): Remove if (error_state) check. * dlmread.cc (Fdlmread): Remove if (error_state) check. * graphics.cc (Fwaitfor): Remove if (error_state) check. * lu.cc (Flu): Remove if (error_state) check. * utils.cc (Ferrno): Remove if (error_state) check. * variables.cc (is_valid_function): Remove if (error_state) check. * fftw.cc (Ffftw): Remove if (error_state) check.
author Rik <rik@octave.org>
date Tue, 17 Feb 2015 17:34:48 -0800
parents 4197fc428c7d
children 4d0c7fec0a31
line wrap: on
line diff
--- a/libinterp/corefcn/utils.cc
+++ b/libinterp/corefcn/utils.cc
@@ -1035,10 +1035,7 @@
         {
           std::string nm = args(0).string_value ();
 
-          if (! error_state)
-            retval = octave_errno::lookup (nm);
-          else
-            error ("errno: expecting string argument");
+          retval = octave_errno::lookup (nm);
         }
       else
         {
@@ -1047,7 +1044,7 @@
           if (! error_state)
             retval = octave_errno::set (val);
           else
-            error ("errno: expecting integer argument");
+            error ("errno: argument must be string or integer");
         }
     }
   else if (nargin == 0)