emacs-devel
[Top][All Lists]
Advanced

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

Re: Dynamic modules: emacs-module.c and signaling errors


From: Eli Zaretskii
Subject: Re: Dynamic modules: emacs-module.c and signaling errors
Date: Wed, 25 Nov 2015 21:19:46 +0200

> From: Philipp Stephani <address@hidden>
> Date: Wed, 25 Nov 2015 18:26:31 +0000
> Cc: address@hidden, address@hidden, address@hidden
> 
> I see a couple of alternatives:
> - If an unhandled error is detected, crash unconditionally, even if checking 
> is
> disabled.

What do you mean by "crash"?  Abort?  That's unacceptable: Emacs
should not abort because some module misbehaved.  A long-lived Emacs
session holds gobs of precious data and state, utterly unrelated to
what a module tried to do, so discarding all that because of some
programming error in some module would be unthinkable.

We should cause such errors signal an error (eventually), like any
Lisp code does.

> - Ignore unhandled errors, proceed as if no error happened. This would be
> consistent with popular C APIs such a the C standard library itself and POSIX.
> - The current approach: crash if checking is enabled, ignore otherwise.

The simple patch I sent a few minutes ago, according to Tom's
suggestion, should cause such errors to signal a Lisp error from
module-call.  I think this is what we should do.



reply via email to

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