Re: Combined usage of exception handling

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Wed, 30 Mar 2005 11:18:20 -0500, "William DePalo [MVP VC++]"
<willd.no.spam@xxxxxxxx> wrote:

>"asid" <asid369@xxxxxxxxxxx> wrote in message
>news:eWdISNUNFHA.3668@xxxxxxxxxxxxxxxxxxxxxxx
>> Does it make sense to use two different exception
>> handling mechanisms in the same application like
>> following?
>
>If you must. Realize that structured exceptions (__try, __catch) are almost
>always indicative of programming errors. Even if you catch one, by the time
>that you do, your application's state may be mucked up tp the point that it
>would have been better to crash and burn.

I use SEH to catch crashes, present a more useful error message to the
user, log the error, along with registers, a stack trace, thread
information, open files, a memory map, handle information, a list of
running programs, etc. (Whichever are possible in the current state.)
Of course, some really bad bugs can make any or all of this
impossible, but most of those are found prior to release.

--
Sev
.



Relevant Pages

  • Re: Writing bulletproof code
    ... > multiple validation at different levels and so there's a slight ... Distinguish between programming errors (bugs) and exceptions. ... all of the information required to handle the exception. ...
    (comp.lang.cpp)
  • Re: Exception Handling
    ... but I can't even get a simple exception to ... the structured exception will get translated to a typed ... It may be just my bias, but I don't like the looks of catch-all clauses. ...
    (microsoft.public.vc.language)
  • Re: Exception handling
    ... > Regardless, Windows exception warning messagebox ... int main ... They can catch programming errors and they are not ever ...
    (microsoft.public.vc.language)
  • Re: Combined usage of exception handling
    ... > Does it make sense to use two different exception ... > handling mechanisms in the same application like ... always indicative of programming errors. ... Regards. ...
    (microsoft.public.vc.language)
  • Re: Exception handling
    ... Programming errors (bugs) are *not* exceptions. ... Bugs cause *unexpected* but predicable events once detected ... an exception should be "handled" ...
    (comp.lang.cpp)