Subject: Re: bug#19212: 24.3; Signaled error doesn't show `error-message'

From: Noam Postavsky <[email-masked]>
Date: Thu, 07 Dec 2017 20:31:57 -0500

tags 19212 notabug
close 19212
quit

[email-masked] (Diogo F. S. Ramos) writes:

> According to (info "(elisp) Error Symbols"), the following sequence of
> forms should signal an error with the string "A new error: x, y":
>
>  (put 'new-error
>       'error-conditions
>       '(error my-own-errors new-error))
>  (put 'new-error 'error-message "A new error")
>  (signal 'new-error '(x y))
>  
> Instead, I got the following in the debugger:
>
>  Debugger entered--Lisp error: (new-error x y)
>    signal(new-error (x y))
>    eval((signal (quote new-error) (quote (x y))) nil)
>    eval-last-sexp-1(nil)
>    eval-last-sexp(nil)
>    call-interactively(eval-last-sexp nil nil)
>
> I evaluated each form inside `*scratch*' using C-x C-e.

    C-x C-e runs the command eval-last-sexp (found in global-map), [...]

    If ‘eval-expression-debug-on-error’ is non-nil, which is the default,
    this command arranges for all errors to enter the debugger.

If you use M-x eval-region instead, then your message will show up.  Or
hit 'c' to continue after the debugger pops up, the message will be
there.