Suppressing error message "-- an error. To debug this try: debugmode(true); "



On 2012-12-01, Stefano Ferri <ferriste at gmail.com> wrote:

> As an alternative, I could print a message with "print" and then stop the
> program in some way.... but is there such a "stop" or "exit" command
> implemented?

Well, from looking at src/merror.lisp there are various ways to handle
errors. Probably the only way to get exactly what you want is to write a
line or two of Lisp code. But with that said, I see 2 things:

 * assign ?errcatch:true and call error("my msg") as before. I see in
   src/merror.lisp that that suppresses the bit about launching the
   debugger.

 * define your own function which uses Maxima's throw/catch mechanism.
   E.g.: myerror (msg) := (print (msg), throw ('oops));
   throw/catch is a nonlocal flow of control mechanism, maybe that's
   what you want.

Hope this helps

Robert Dodier