By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,389 Members | 1,795 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,389 IT Pros & Developers. It's quick & easy.

"exception not rethrown" problem

P: n/a
I'm using Pthreads in a C++ program that uses exceptions. When one
thread is cancelled (cancellation state is deferred) by the main
thread, it throws some mysterious exception which cannot even be caught

by "catch(...)". The program aborts with the following error message:

FATAL: exception not rethrown
Abort
Anybody have ideas how to avoid this problem? Specifically, how to
catch the cancellation exception, or how to ignore it? Thanks a lot.

Jun 14 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
D'artagnan wrote:
I'm using Pthreads in a C++ program that uses exceptions. When one
thread is cancelled (cancellation state is deferred) by the main
thread, it throws some mysterious exception which cannot even be caught

by "catch(...)". The program aborts with the following error message:

FATAL: exception not rethrown
Abort
Anybody have ideas how to avoid this problem? Specifically, how to
catch the cancellation exception, or how to ignore it? Thanks a lot.


No idea, and since standard C++ knows naught of pthreads, you'll want
to post in a more appropriate newsgroup (I see you've already posted to
comp.programming.threads, but you might want to try one for your
platform as well). See this FAQ for what is on topic here:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

Cheers! --M

Jun 14 '06 #2

P: n/a
Stack overflow is one class of exception that can be uncatchable, since
the stack is in too poor a state to be unwound by the exception handling
system. Maybe you have a re-entrant or recursive routine? Or a method
overriden to accept different argument types but one of those types has
a copy constructor for one of the other types? That can cause such
methods to wind up calling themselves. If it is stack overflow, my guess
is it's in a destructor somewhere. Or maybe the thread needs a larger
stack allocation. A first step would be to just print function
entrypoints to your debugger, and see if they pile up too much.

Ray
D'artagnan wrote:
I'm using Pthreads in a C++ program that uses exceptions. When one
thread is cancelled (cancellation state is deferred) by the main
thread, it throws some mysterious exception which cannot even be caught

by "catch(...)". The program aborts with the following error message:

FATAL: exception not rethrown
Abort
Anybody have ideas how to avoid this problem? Specifically, how to
catch the cancellation exception, or how to ignore it? Thanks a lot.

Jun 19 '06 #3

P: n/a

D'artagnan wrote:
I'm using Pthreads in a C++ program that uses exceptions. When one
thread is cancelled (cancellation state is deferred) by the main
thread, it throws some mysterious exception which cannot even be caught

by "catch(...)". The program aborts with the following error message:

FATAL: exception not rethrown
Abort
Anybody have ideas how to avoid this problem? Specifically, how to
catch the cancellation exception, or how to ignore it? Thanks a lot.

could it be that your exception class does not have a copy constructor?

Jun 19 '06 #4

P: n/a

D'artagnan wrote:
I'm using Pthreads in a C++ program that uses exceptions. When one
thread is cancelled (cancellation state is deferred) by the main
thread, it throws some mysterious exception which cannot even be caught

by "catch(...)". The program aborts with the following error message:

FATAL: exception not rethrown
Abort
Anybody have ideas how to avoid this problem? Specifically, how to
catch the cancellation exception, or how to ignore it? Thanks a lot.

could it be that your exception class does not have a copy constructor?

Jun 19 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.