octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48949] mexCallMATLABWithTrap not implemented


From: Guillaume
Subject: [Octave-bug-tracker] [bug #48949] mexCallMATLABWithTrap not implemented and problem with mexCallMATLAB/mexSetTrapFlag
Date: Tue, 30 Aug 2016 13:37:27 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0

Follow-up Comment #1, bug #48949 (project octave):

I've just made the following tiny change:


diff -r dc4e2203cd15 libinterp/corefcn/mex.cc
--- a/libinterp/corefcn/mex.cc  Mon Aug 29 14:32:22 2016 -0700
+++ b/libinterp/corefcn/mex.cc  Tue Aug 30 14:30:37 2016 +0100
@@ -3072,7 +3072,11 @@
   catch (const octave::execution_exception&)
     {
       if (mex_context->trap_feval_error)
-        recover_from_exception ();
+        {
+          recover_from_exception ();
+          
+          execution_error = true;
+        }
       else
         {
           args.resize (0);


and it now returns a non zero value when an error is caught. The error message
is still being displayed though:


octave:1> test_mexCallMATLAB('e')
error: fileread: cannot open file
status = 1.


Maybe the same approach than the one used by @oheim in patch #8033 can be used
here.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48949>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]