[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Errors in interactive commands

From: Stefan Monnier
Subject: Re: Errors in interactive commands
Date: Wed, 03 Aug 2011 10:41:34 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> Examples such like this one is why I propose using something like
>> (throw 'command-level) instead of raising an error.
> How would that change anything, apart from breaking code that tries to
> catch the error?  Raising an error throws to top-level by default
> anyway.

Exactly.  I think signalling errors is not a bad approach, tho it should
be improved to use `user-error' rather than just `error' for cases which
are normally associated with user errors (which are usually listed in
debug-ignored-errors).  This way we won't need as many regexps in

As for the difference between signalling errors and returning nil, they
are fundamentally equivalent, so it's really a question of which is more
convenient "in typical cases".
More consistency would be good, but since any changes in this area risk
introducing backward compatibility problems, I'm strongly in favor of
leaving things as they are.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]