help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

set_terminate and set_unexpected with threads


From: Domenico Andreoli
Subject: set_terminate and set_unexpected with threads
Date: Thu, 23 Dec 2004 18:37:48 GMT
User-agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux))

Hi all,

I'm trying to set up a uncaught exception handler at process level in a
c++ program. I'm using g++ Debian package version 1:3.3.5-5 and
std::set_terminate() and std::set_unexpected() (where are they
documented?).

My program is multi-threaded.  I'm already able to set up my handlers in
the main thread and catch all the exceptions thrown by the main thread.
What I'm not able to do is to trap all the uncaught exceptions thrown by
non-main threads. It looks like as if set_terminate and set_unexpected
always set the main thread handlers.

Anybody has a hint for me? Have I to dive into the gcc code? arghh...

Merry Christmas and happy new year :)
Domenico

-----[ Domenico Andreoli, aka cavok
 --[ http://people.debian.org/~cavok/gpgkey.asc
   ---[ 3A0F 2F80 F79C 678A 8936  4FEE 0677 9033 A20E BC50


reply via email to

[Prev in Thread] Current Thread [Next in Thread]