make D windows-aware
kris
foo at bar.com
Wed Mar 22 17:44:43 PST 2006
Jarrett Billingsley wrote:
> "Regan Heath" <regan at netwin.co.nz> wrote in message
> news:ops6uelhqc23k2f5 at nrage.netwin.co.nz...
>
>>Can you catch them all in WinMain i.e.
>>
>>try {
>> ..main..
>>} catch(Object o) {
>> MessageBox(...
>>}
>
>
> If I use the method proposed by Sean, I'd have to catch the exceptions in my
> own main function, as the dmain catches them and prints them to the console.
> i.e.
>
> extern(C) main(..)
>
> int WinMain(..)
> {
> return main(1, &cmdline);
> }
>
> void main()
> {
> try
> {
> crap
> }
> catch(Exception e)
> {
> MessageBox("oh man" ~ e.toString());
> }
> }
>
> Pretty ugly.
You might ask Sean to decouple the default exception-handler from the
runtime support in Ares. The idea would be that you could provide your
own default-handler, and then the linker would bind that instead. Sean
is already doing a lot of things like that with Ares, so it may not be
too much of a stretch.
More information about the Digitalmars-d
mailing list