#2147 errormsg : false does not turn off all error printing

Lisp Core (471)
Nils Bruin

The following illustrates the problem:

(%i1) errormsg : false ;
(%o1) false
(%i2) 1/0;

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

As you can see, the error message itself is suppressed but the message about debugmode survives. In fact, reading MERROR in merror.lisp, it is clear that this message is not suppressed. Probably the line

(format t (intl:gettext "~& -- an error. To debug this try: debugmode(true);~%"))

should be replaced by

(and $errormsg (format t (intl:gettext "~& -- an error. To debug this try: debugmode(true);~%")))

This change does not make much difference for using maxima as intended, but is very important when trying to use maxima as a library.


  • Nils Bruin

    Nils Bruin - 2011-01-30
    • milestone: --> Includes_proposed_fix
  • Dieter Kaiser

    Dieter Kaiser - 2011-10-26

    I am not convinced, that it is a good idea to modify the reported behavior. The second message is due to a break of Maxima.

    Maxima has the function errcatch with the required behavior. The result of the function errcatch is an empty list, when Maxima encountered an error.

    (%i1) errormsg:false$

    (%i2) errcatch(1/0);
    (%o2) []

    The last error can be displayed with the command errormsg().

    (%i3) errormsg();
    expt: undefined: 0 to a negative exponent.
    (%o3) done

    I would like to suggest to close this bug report as won't fix.

    Dieter Kaiser

  • Dieter Kaiser

    Dieter Kaiser - 2011-10-26
    • status: open --> pending
  • Raymond Toy

    Raymond Toy - 2012-08-15
    • status: pending --> closed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks