On 12/09/2016 02:06 PM, Julien Bect wrote:
Le 09/12/2016 à 15:33, John W. Eaton a écrit :
Yes, Octave should exit with a non-zero status if there is a syntax
error. But the real bug here is the unhandled execution exception.
That shouldn't happen. I'll take a look at fixing that.
Note that this happens with any error, not just syntax errors. For
instance:
$ octave --eval 'error ("toto")'
error: toto
error: unhandled execution exception -- eval failed
$ echo $?
0
I pushed the following changeset to stable:
http://hg.savannah.gnu.org/hgweb/octave/rev/233fb529184b
It should fix the problem for parse or evaluation errors.
jwe