Eliminating use of error_state in Octave code

Since version 4.2.0 (released 2016-11-13) the error_state variable has done nothing. Although we left it in liboctinterp so that old code could continue to compile and link, it is initialized to 0 and its value is never changed by Octave. Any code that relies on it ever having a nonzero value probably doesn’t work as expected. In version 6 we tagged it as deprecated, so compiling code that uses it should generate a warning.

Recently, I noticed that some Octave packages that are distributed with our mxe-octave builds still reference error_state. This includes the following packages:

communications-1.2.3
database-2.4.4
image-2.8.1
interval-3.2.0
lssa-0.1.4
ocs
optim-1.6.1
signal-1.4.1
sparsersb-1.0.8
strings-1.2.0
struct-1.0.17
tisean-0.2.3
video-2.0.0

From what I could tell, some of these packages may have checks for error_state but they assume that if it is present, it works and that hasn’t been correct since before version 4.2.0.

I’d like to try to eliminate the remaining uses of this variable, at least from code that we distribute as part of our mxe-octave builds. If there are package developers out there who would like to help with this job, then I can offer some tips for how to make the changes.

1 Like