This is the mail archive of the
pthreads-win32@sources.redhat.com
mailing list for the pthreas-win32 project.
RE: mingw32 DLLs, threads and exceptions HOWTO
- To: 'Thomas Pfaff' <tpfaff at gmx dot net>, rpj at ise dot canberra dot edu dot au
- Subject: RE: mingw32 DLLs, threads and exceptions HOWTO
- From: "Bossom, John" <John dot Bossom at Cognos dot COM>
- Date: Mon, 11 Dec 2000 10:20:11 -0500
- Cc: pthreads-win32 at sources dot redhat dot com
Just a technical note, you CAN get the Win32 environment to deal with
hardware exceptions by registering a handler with the Win32 Structured
Exception Handler and have that map the hardware exceptions to some
C++ exception and then throw it.
However, as Thomas pointed out, indirectly, on UNIX, the C++ mechanism
does not, and will not, handle hardware exceptions.
-----Original Message-----
From: Thomas Pfaff [mailto:tpfaff@gmx.net]
Sent: December 11, 2000 4:21 AM
To: rpj@ise.canberra.edu.au
Cc: pthreads-win32@sources.redhat.com
Subject: Re: mingw32 DLLs, threads and exceptions HOWTO
Hello Ross,
catch(...) does not work simply because no exception is raised (LINUX won't
either). This is a MSVC runtime feature.
You have to install a SIGFPE signal handler and use setjmp/longjmp to get
FP exceptions.
Regards,
Thomas
> Ross Johnson wrote
>
> As you noted, the exception1.c test fails. For some reason
> catch(...) isn't catching the deliberate zero divide exception.
> I've substituted a different exception, which passes. (The
> test simply confirms that the redefinition of catch in
> pthread.h works.)
>