"exception not rethrown" problem

Discussion in 'C++' started by D'artagnan, Jun 14, 2006.

  1. D'artagnan

    D'artagnan Guest

    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.
     
    D'artagnan, Jun 14, 2006
    #1
    1. Advertisements

  2. D'artagnan

    mlimber Guest

    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-lite/how-to-post.html#faq-5.9

    Cheers! --M
     
    mlimber, Jun 14, 2006
    #2
    1. Advertisements

  3. D'artagnan

    Ray Gardener Guest

    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
     
    Ray Gardener, Jun 19, 2006
    #3
  4. D'artagnan

    Peter Guest


    could it be that your exception class does not have a copy constructor?
     
    Peter, Jun 19, 2006
    #4
  5. D'artagnan

    Peter Guest


    could it be that your exception class does not have a copy constructor?
     
    Peter, Jun 19, 2006
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.