Error: WndProc - nothrow

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Sep 17 15:13:34 PDT 2012


On 9/17/12, Simon <s.d.hammett at gmail.com> wrote:
> You MUST NOT allow a D exception to
> propagate out of the wndproc (or indeed any other Win32 callback
> function) as the Win32 calling code has no idea how to process it and
> you'll just get a crash.
>

That's just complete and utter bullshit. A try/catch can be set in
WinMain, and any thrown exceptions in WndProc will propagate there.

Code:
http://dpaste.dzfl.pl/84293982

Screenshot:
http://i.imgur.com/r5wJh.png


More information about the Digitalmars-d-learn mailing list