Article: D Exceptions and C Callbacks

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Aug 7 05:18:37 PDT 2013


On 8/7/13, Johannes Pfau <nospam at example.com> wrote:
> http://dpaste.dzfl.pl/0f23146f
> There's no difference in the generated code, but this way the compiler
> will complain if you pass a non-nothrow function to
> glfwSetWindowCloseCallback.

Although this only stops Exception types from propagating. Error and
Throwable will still be allowed to be thrown. I would find it
dangerous if a C library ends up swallowing a Throwable and continues
execution like nothing happened.


More information about the Digitalmars-d-announce mailing list