"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. Advertising

  2. D'artagnan

    mlimber Guest

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

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

  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


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

    Peter Guest

    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?
    Peter, Jun 19, 2006
    #4
  5. D'artagnan

    Peter Guest

    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?
    Peter, Jun 19, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Suurkuusk
    Replies:
    0
    Views:
    3,948
    Andreas Suurkuusk
    Jul 27, 2003
  2. Ted Miller
    Replies:
    0
    Views:
    5,135
    Ted Miller
    Sep 13, 2003
  3. Merek
    Replies:
    0
    Views:
    1,941
    Merek
    Dec 3, 2003
  4. Jarek
    Replies:
    1
    Views:
    1,643
    =?ISO-8859-1?Q?Stefan_N=E4we?=
    Sep 7, 2005
  5. Mike

    Problem problem problem :( Need Help

    Mike, May 7, 2004, in forum: ASP General
    Replies:
    2
    Views:
    528
    Bullschmidt
    May 11, 2004
Loading...

Share This Page