From: Sam S. <sd...@gn...> - 2000-08-06 10:32:57
|
Bruno Haible wrote: > > Sam writes: > > I noticed the following: > > $ clisp -q -norc -x '(error)' > > > > *** - EVAL: too few arguments given to ERROR: (ERROR) > > $ echo $? > > 0 > > $ > > > > shouldn't it be 1? > > I mean, when the `-x' args raise an exception, shouldn't this be an > > error? > > The current implementation gives an exit code of 1 if an -l (load) or > -c (compile-file) option fails. But for the error handling of your own > forms you are responsible yourself. The macro lisp:exit-on-error is > documented; you can use it. If the -x form were wrapped inside a > lisp:exit-on-error call by default, people who wish a different error > behaviour would have a hard time to achieve it. it would seem more natural to exit with a status on error and let those who don't like this wrap their code in ignore-errors. now: I want: clisp -x (error) => 0 1 clisp -x (ignore-errors (error)) => 0 0 clisp -x (lisp:exit-on-error (error)) => 1 1 > Btw, your without-floating-point-underflow patch was not correct. Please > reinsert the PROGN. why? isn't (let (...) ...) === (let (...) (progn ...))? |