Subject: bug#66912: With `require', the byte compiler reports the wrong file for errors.

From: Stefan Monnier <[email-masked]>
Date: Sun, 10 Nov 2024 11:45:38 -0500

>> Then I don't know what "the message" you're referring to.
>> (or are you referring to some other point you made elsewhere?)
> I simply meant what the user sees on the screen.  If the user sees
> "While loading foo.el... \nWrong type argument: listp, baz" whilst doing
> something, then enables the debugger and repeats the action, she should
> see the same message at the top of the backtrace.  Surely?  Truncating
> that message can only lead to confusion.

I still don't understand: currently, if you see a message "Wrong
type argument: listp, baz", then enable the debugger and reproduce the
error, you won't see "Wrong type argument: listp, baz" but

    Debugger entered--Lisp error: (wrong-type-argument listp baz)

instead.  IOW, instead of the error message, you see the error object.

> Again, why do you think this is what we should aim for, rather than
> having the same message in the error handler and at the top of a
> backtrace?

Because of my "A => B => compile => C => D" example: the message I want
to have depends on the chain from the point where I catch the error
(i.e. the `condition-case`) to the point where the error is signaled.
And I don't really care about the debugger case.

        Stefan