Suppressing error message "-- an error. To debug this try: debugmode(true); "
Subject: Suppressing error message "-- an error. To debug this try: debugmode(true); "
From: Robert Dodier
Date: Sat, 1 Dec 2012 21:15:01 +0000 (UTC)
On 2012-12-01, Stefano Ferri <ferriste at gmail.com> wrote:
> which only prints a new line. It works perfectly but maybe it is a ugly
> solution... How can I avoid to rewrite all the function and redefine only
> the "format t (....." line?
> Even if ugly, could it be a correct solution?
Yes, it's correct. No,there isn't (given the function definitions as
they are) to omit only the one line.
>> * 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.
>
> I'll look at this way too, but I would lose the information contained in
> errormsg(), which sometimes is useful.
Well, you can throw any expression. So it might be something like
oops("some message", parameter1=1234, parameter2=2345) where the
parameters give some context about the error.
best
Robert Dodier