|
From: | Julien Bect |
Subject: | Re: Octave's exit status |
Date: | Fri, 9 Dec 2016 20:06:30 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 |
Le 09/12/2016 à 15:33, John W. Eaton a écrit :
On 12/09/2016 03:47 AM, Julien Bect wrote:Hi all, I observe the following with Octave 4.2.0: $ octave --eval '1+?' parse error: syntax error1+?^ error: unhandled execution exception -- eval failed $ echo $? 0 Is this a feature or a bug ? I would have expected a non-zero exit status in such a case...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
[Prev in Thread] | Current Thread | [Next in Thread] |