----- Original Message ----- From: "Gordon McMillan" <gmcm@hypernet.com> > On 5 May 2002 at 16:01, David Abrahams wrote: > > > From: "Gordon McMillan" <gmcm@hypernet.com> > > > > > There is some strangeness to exceptions, Linux, gcc > > > and linking. In scxx (my minimalist C++ / Python > > > interface), there's no separate .so involved - the > > > scxx code is compiled in with the extension. There > > > are no statics involved, so C linkage works (you > > > don't need a relinked Python). At a certain gcc > > > release, exceptions thrown and caught at the top > > > level > > > > What does "at the top level" mean? > > The function is an entry point. I think eric diagnosed > it as simply throw / catch at the same level. Throwing > in a called function & catching in the caller worked > fine for both of us. Are you saying that the following prints "fail"? #include <iostream> void init_mymodule() { try { throw "hello"; } catch( char const*) {} catch(...) { std::cout << "fail"; } } but that this does not? #include <iostream> void throw_hi() { throw "hello"; } void init_mymodule() { try { throw_hi(); } catch( char const*) {} catch(...) { std::cout << "fail"; } }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4