Re: exception problem with cygwin - terminate called recursively

Discussion in 'C++' started by peter koch, Jul 14, 2011.

  1. peter koch

    peter koch Guest

    Den torsdag den 14. juli 2011 17.48.24 UTC+2 skrev Philipp Kraus:
    > On 2011-07-14 17:11:25 +0200, peter koch said:
    >
    > > It seems to me that your exception either has no corresponding catch
    > > clause or that it is thrown when another exception is active: this
    > > causes std::terminate to be called.

    >
    > on the main program the exception should be catched like:
    >
    > myclass {
    > mymethod() {
    > if something
    > mymethod()
    >
    > throw exception
    > }
    > }
    >
    > main() {
    > myclass x;
    > try {
    > x.mymethod()
    > } catch (...) {}
    >
    > }
    >


    So you tried that program and it had the same behaviour?

    > In my optinion I think if I throw an exception the complete runing
    > process would be breaked down and the exception is send to the main
    > program, if there is a try-catch the exception is be handled, if not
    > the program terminates. I don't use any threads. I don't understand why
    > Windows should be handle the exception in another way than Linux and
    > OSX !?


    It does not.

    >
    > Thanks for your answer
    >


    If there is not a corresponding catch, std::terminate will be called. You said that std::terminate was called recursively?

    Your problem might also be in the compiler flags used for the compiler.

    /Peter
    peter koch, Jul 14, 2011
    #1
    1. Advertising

  2. peter koch

    Ian Collins Guest

    On 07/15/11 04:00 AM, peter koch wrote:
    >
    > If there is not a corresponding catch, std::terminate will be called. You said that std::terminate was called recursively?
    >
    > Your problem might also be in the compiler flags used for the compiler.


    Please don't use the sociopathic "new" google interface, it ruins
    threading!

    --
    Ian Collins
    Ian Collins, Jul 14, 2011
    #2
    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. Mohsen
    Replies:
    14
    Views:
    13,995
    Nate Barney
    Nov 8, 2006
  2. Philipp Kraus
    Replies:
    7
    Views:
    942
    Philipp Kraus
    Jul 17, 2011
  3. Philipp Kraus
    Replies:
    0
    Views:
    608
    Philipp Kraus
    Jul 17, 2011
  4. Daniel Fetchinson
    Replies:
    0
    Views:
    190
    Daniel Fetchinson
    Oct 2, 2012
  5. Peter Otten
    Replies:
    0
    Views:
    192
    Peter Otten
    Oct 2, 2012
Loading...

Share This Page