Unifying Exception types in setup

Max Bowsher maxb@ukf.net
Sun Mar 16 15:25:00 GMT 2003


Pavel Tsekov wrote:
> On Sun, 16 Mar 2003, Max Bowsher wrote:
>
>>> If you going to do this I suggest you to dereive a new class from
>>> exception or Exception, say FatalException. Then install a global
>>> handler, which catches FatalException and displays a message then
>>> exits. This way the exit call will be in a single place and not
>>> scattered throught the code.
>>
>> All exceptions are fatal if they get to the toplevel.
>
> Yep! Maybe I made a wrong example. My point was - no other exception
> should reach the toplevel except the the one designated to kill setup
> i.e. the one which you will use to replace the exit () calls.
>
> If another exception reaches then it should be treated as a bug.
>
>> Unfortunately, we will require multiple toplevel catch blocks: One
>> in each WndProc and thread initiation routine.

Actually, I've just read about set_terminate(), and I'm not so sure about
this now.

I wonder how exceptions interact with WndProcs. Will they stop unwinding
when they reach the end of the applications code, or will they unwind
through the guts of Windows, and (maybe?) emerge back in main? Does it
matter?

> Btw I remember that Robert had some concerns about exceptions and
> mingw. The info should be in the archives. And I don't know if these
> problems still exist.

No luck searching. "Exception" produces far too many useless hits.



More information about the Cygwin-apps mailing list