This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unifying Exception types in setup


Pavel Tsekov wrote:
> Just chaging exit() -> throw Exception won't help much. There should
> be
> an exception handler installed who takes care of processing these
> exceptions i.e. shutdown setup with a simple message describing the
> situation.

Yes, thats the next step.

> 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.

Unfortunately, we will require multiple toplevel catch blocks: One in each
WndProc and thread initiation routine.

> Btw why do you want to use a single exception type ? IMO, this way you
> defeat the purpose of exceptions to a certain degree. Different
> exceptions should cover different types of errors/events - say
> IOException, CRCExcepion, AuthenticationException.

Makes sense. I'll wait for Robert to explain why setup has 2 different
exception paradigms, and which one can be removed, and if we keep Exception,
whether we can junk appErrNo, and replace it with derived classes as you
suggest.

Max.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]