[Top][All Lists]

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

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

From: Stefan Monnier
Subject: Re: Dynamic modules: emacs-module.c and signaling errors
Date: Thu, 26 Nov 2015 11:36:00 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> Are you talking about signaling and throwing in case of errors?

Yes, that's the only issue at stake.

> I think we should be pragmatic here.  If there's a way of having an
> interface that is safe in the face of the likes of C++ exceptions,
> without unduly punishing module authors, we should take it.

The interface we expose is a C interface.
We could add a C++ interface on top of it, of course, but I think we
should first focus on interfacing with C code.

> I believe we've already found a reasonably good way to handle
> signaling errors and throwing.  (I will soon install the changes I
> posted yesterday.)  With that in place, module code that wants to
> signal an error will look very much like what we do in core in similar
> situations.

The issue at stake is when module code calls an Emacs function that
signals an error.  In the basic API this signal should not be caught by
the module API (i.e. Emacs's Fsignal code will happily longjmp out of
the modules code when applicable), unless explicitly requested via
something like env->safe_funcall.


reply via email to

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