octave-maintainers
[Top][All Lists]
Advanced

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

Re: error_state elimination


From: John W. Eaton
Subject: Re: error_state elimination
Date: Wed, 25 Nov 2015 15:48:00 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0

On 11/23/2015 01:09 PM, John W. Eaton wrote:
On 11/23/2015 12:59 PM, Rik wrote:

1) Finish elimination of error_state variable in C++ code (~80
instances left)
   Help jwe out in this task.  The remaining instances need more thought
than the simple eliminations already done.

I would like to get this job done, but at this point I think nearly
every remaining case will need a little bit of thought, and in some
cases some careful review to ensure that the code is still behaving as
it should.

I think this job is finished in core Octave with this changeset:

  http://hg.savannah.gnu.org/hgweb/octave/rev/200ae1d650b7

As far as I know, the only places that error_state is mentioned now are the error.h and error.cc files where it is declared and defined for backward compatibility. Eventually we can tag it as deprecated so that GCC can warn about it if it used, then some time later we might be able to remove it completely. There is also some code in the JIT compiler that appears to have been intended to deal with error_state, but I don't really understand it. It does use the global error_state variable directly in one place. I have not tried to verify that JIT-compiled code does the right thing with the new exception-based errors.

There are many opportunities now for adding better error messages for value extractor functions.

There are probably also other places where we could do a better job of handling exceptions.

And, of course, we could begin removing error_state from Octave Forge, but then those files will be dependent on the development version of Octave. I count around 500 instances of error_state in the Octave Forge code now. Just as in the Octave sources, many will be trivial to remove but others will require some thought. In some cases, behavior will not be equivalent when using the current Octave Forge code (that assumes error_state works as in all previous versions of Octave) with the current version of Octave until something is done to handle exceptions.

jwe




reply via email to

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