Boost logo

Boost :

From: Jason Shirk (jasonsh_at_[hidden])
Date: 2002-01-15 16:52:54


> -----Original Message-----
> From: Brey, Edward D [mailto:EdwardDBrey_at_[hidden]]
>
> [Ed]
> The first thing that comes to mind is a catch(...) in the test tools
> library. This would solve the problem for VC, due to its merging of
> structured and C++ exception handling. I'm not sure about the other
Win32
> compilers. I don't remember the rationale for not including a catch
all
> in
> the test library. Is there a good reason not to?
>
>

We consider catching AV's w/ catch(...) a bug and are considering
changing the behavior in the future (perhaps w/ a switch and warnings.)

There are other options. When we run our regression tests, we call:

        SetErrorMode(SEM_NOGPFAULTERRORBOX);

Note this is not recommended unless you are actually running the process
as a debugger, at least according to the SDK documentation. It seems to
work for our purposes.

Another possibility is to use the API SetUnhandledExceptionFilter.
There is an excellent article on MSDN that demonstrates some fun things
you can do with this, see:

http://www.microsoft.com/msj/defaultframe.asp?page=/msj/0497/hood/hood04
97.htm&nav=/msj/0497/newnav.htm

Jason Shirk
VC++ Compiler Team


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk