Bug 5261 – Uncompilable example for Windows

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-11-23T12:36:00Z
Last change time
2012-01-20T02:30:00Z
Assigned to
nobody
Creator
simen.kjaras

Comments

Comment #0 by simen.kjaras — 2010-11-23T12:36:04Z
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.
Comment #2 by bugzilla — 2012-01-20T02:30:00Z
Fixed 2.058