Article: D Exceptions and C Callbacks

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Aug 8 14:27:25 PDT 2013


On 8/8/13, Walter Bright <newshound2 at digitalmars.com> wrote:
> I agree that C callbacks called from C code should be nothrow.
>
> At a minimum, the C code that calls the callback is not going to be
> expecting an
> exit via exception, and so may leave things in an indeterminate state.

What about Error and Throwable? I think those shouldn't pass to the C
code either. Unforunately 'nothrow' is a misnomer because it really
means 'noexception', it allows both Error and Throwable to propagate
from nothrow functions.


More information about the Digitalmars-d-announce mailing list