make D windows-aware

Jarrett Billingsley kb3ctd2 at yahoo.com
Wed Mar 22 19:55:24 PST 2006


"Sean Kelly" <sean at f4.ca> wrote in message 
news:dvt5j1$2n35$1 at digitaldaemon.com...
> Why not catch all exceptions in main, display them as appropriate, and 
> then rethrow:

Because that's ugly ;)

Seriously, though, I'm working with some more novice programmers, and I want 
to make this as easy as possible for them.  So I'd like to be able to say 
"just put everything in this function and don't worry about it."  I think 
the extra layer of main like Regan suggested is what I'll do.

> Passing exceptions completely through the runtime would be a bit weird, as 
> by the time the exception reached WinMain module dtors would have been 
> called, the GC would have been terminated, etc.

They'd never make it all the way back to WinMain; they get caught by dmain 
and printed to the console.  It's a consequence of dmain being meant for 
console apps. 





More information about the Digitalmars-d mailing list