On http://digitalmars.com/d/2.0/windows.html, a function ExceptionHandler with the signature void function(Exception) is defined, while Runtime.initialize expects the signature void function(Throwable). Because of this, the example does not compile.
Comment #1 by andrej.mitrovich — 2011-01-14T18:09:00Z
Also, I believe this:
catch (Object o) // catch any uncaught exceptions
{
MessageBoxA(null, cast(char *)o.toString(), "Error",
MB_OK | MB_ICONEXCLAMATION);
result = 0; // failed
}
should be replaced with:
catch (Throwable thr) // catch any uncaught exceptions
{
MessageBoxA(null, cast(char *)thr.toString(), "Error",
MB_OK | MB_ICONEXCLAMATION);
result = 0; // failed
}
since catching Objects should be illegal.