diff libinterp/parse-tree/pt-arg-list.cc @ 20797:22618d5fb6ad

eliminate remaining uses of error_state in parse-tree files * oct-parse.in.yy, pt-arg-list.cc, pt-colon.cc: Eliminate all uses of error_state.
author John W. Eaton <jwe@octave.org>
date Fri, 09 Oct 2015 15:17:08 -0400
parents 7ac907da9fba
children 128414587af2
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-arg-list.cc
+++ b/libinterp/parse-tree/pt-arg-list.cc
@@ -240,21 +240,21 @@
 
       if (elt)
         {
-          octave_value tmp = elt->rvalue1 ();
-
-          if (error_state)
+          try
             {
-              error ("evaluating argument list element number %d", k+1);
-              args.clear ();
-              break;
-            }
-          else
-            {
+              octave_value tmp = elt->rvalue1 ();
+
               if (tmp.is_cs_list ())
                 args.push_back (tmp.list_value ());
               else if (tmp.is_defined ())
                 args.push_back (tmp);
             }
+          catch (const octave_execution_exception&)
+            {
+              args.clear ();
+
+              error ("evaluating argument list element number %d", k+1);
+            }
         }
       else
         {