changeset 33498:a57844d3919e bytecode-interpreter

maint: Merge default to bytecode-interpreter
author Arun Giridhar <arungiridhar@gmail.com>
date Wed, 01 May 2024 12:31:38 -0400
parents adbe8bb3bcaa (current diff) ece9fb6398c3 (diff)
children 93ed5f5a8123
files libinterp/corefcn/toplev.cc
diffstat 1 files changed, 4 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/toplev.cc	Wed May 01 10:34:25 2024 -0400
+++ b/libinterp/corefcn/toplev.cc	Wed May 01 12:31:38 2024 -0400
@@ -262,16 +262,7 @@
   bool return_output = (nargin == 1 && nargout > 1);
 
   if (nargin > 1)
-    {
-      try
-        {
-          return_output = args(1).is_true ();
-        }
-      catch (execution_exception& ee)
-        {
-          error (ee, "system: RETURN_OUTPUT must be boolean value true or false");
-        }
-    }
+    return_output = args(1).strict_bool_value ("system: RETURN_OUTPUT must be boolean value true or false");
 
   if (return_output && type == et_async)
     error ("system: can't return output from commands run asynchronously");
@@ -322,6 +313,9 @@
 
 %!error system ()
 %!error system (1, 2, 3)
+%!error <RETURN_OUTPUT must be boolean value> system (ls_command (), "foo")
+%!error <TYPE must be .*sync.* or .*async> system (ls_command (), true, "foo")
+%!warning <converted to logical 1> system (ls_command (), 0.5);
 */
 
 static octave_value