Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #7812

Re: exception problem with cygwin - terminate called recursively

From Philipp Kraus <philipp.kraus@flashpixx.de>
Newsgroups comp.lang.c++
Subject Re: exception problem with cygwin - terminate called recursively
Date 2011-07-14 18:11 +0200
Organization 1&1 Internet AG
Message-ID <ivn4fq$iog$1@online.de> (permalink)
References <ivmv25$e8v$1@online.de> <27226563-9435-441f-a626-08e3ae85f811@glegroupsg2000goo.googlegroups.com>

Show all headers | View raw


On 2011-07-14 18:00:47 +0200, peter koch said:

> 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?

yes

> 
>> 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?

Sorry, my mistake. The exception that is thrown shoudl be called recursively.

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

I use on all systems the gcc, but I don't know any flags that are set 
for exception handling
I'm a little bit confused

Thanks

Phil

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: exception problem with cygwin - terminate called recursively peter koch <peter.koch.larsen@gmail.com> - 2011-07-14 09:00 -0700
  Re: exception problem with cygwin - terminate called recursively Philipp Kraus <philipp.kraus@flashpixx.de> - 2011-07-14 18:11 +0200
  Re: exception problem with cygwin - terminate called recursively Ian Collins <ian-news@hotmail.com> - 2011-07-15 07:36 +1200
  Re: exception problem with cygwin - terminate called recursively Philipp Kraus <philipp.kraus@flashpixx.de> - 2011-07-16 15:56 +0200
    Re: exception problem with cygwin - terminate called recursively Paavo Helde <myfirstname@osa.pri.ee> - 2011-07-16 11:04 -0500
      Re: exception problem with cygwin - terminate called recursively Philipp Kraus <philipp.kraus@flashpixx.de> - 2011-07-16 19:54 +0200
        Re: exception problem with cygwin - terminate called recursively Paavo Helde <myfirstname@osa.pri.ee> - 2011-07-16 15:26 -0500
          Re: exception problem with cygwin - terminate called recursively Philipp Kraus <philipp.kraus@flashpixx.de> - 2011-07-16 23:59 +0200
            Re: exception problem with cygwin - terminate called recursively Paavo Helde <myfirstname@osa.pri.ee> - 2011-07-16 17:39 -0500
              Re: exception problem with cygwin - terminate called recursively Philipp Kraus <philipp.kraus@flashpixx.de> - 2011-07-17 01:17 +0200
                Re: exception problem with cygwin - terminate called recursively Paavo Helde <myfirstname@osa.pri.ee> - 2011-07-17 02:30 -0500
                Re: exception problem with cygwin - terminate called recursively Philipp Kraus <philipp.kraus@flashpixx.de> - 2011-07-17 11:18 +0200

csiph-web