[ROOT] Re: RE:CINT: exceptions on Linux?

From: Christoph Bugel (chris@tti-telecom.com)
Date: Fri Aug 10 2001 - 17:48:37 MEST


I just checked my Linux compilation flags, and I did not use -DG__STD_EXCEPTION
or -DG__EXCEPTIONWRAPPER, so that should be ok.  I will try to see if they are
#defined by something else (like in windows), but I don't think so.
Thank you for the information, I will let you know if I still can't fix it :)

(about Api.cxx, I took all cint/src/*.CXX files out of my unix makefiles,
because I noticed that they are not strictly necessary. But I don't think that
is the problem, the same makefile works fine on solaris. Of course I have an
interactive /usr/local/bin/cint built complete with all the nice features such
the function and the class debugger commands)

Thanks,
Christoph


On Fri 2001-08-10, Masaharu Goto wrote:
> Hello Chris,
> 
> Cint's exception handling works as follows.
> 
> 1. Compile switches
>   There are 2 compile time switch to turn on/off cint's
>   exception handling. 
> 
>     G__EXCEPTIONWRAPPER
>        Cint handles compiled exception only if this macro
>       is defined. Otherwise, thrown exception will pass through
>       upper level. All the compiled exceptions are caught by
>       catch(...). 
> 
>     G__STD_EXCEPTION
>        If this macro is defined, exception class or a class object
>       derived from exception class is caught by Cint exception
>       wrapper function in Api.cxx.
>        G__EXCEPTIONWRAPPER is automatically defined if G__STD_EXCEPTION
>       is defined.
> 
> I recommend you to look into Api.cxx , G__ExceptionWrapper() and
> newlink.c, G__call_cppfunc(). 
> 
> 
> Thank you
> Masaharu Goto
> 
> 
> >Date: Thu, 9 Aug 2001 19:56:23 +0300
> >From: Christoph Bugel <chris@tti-telecom.com>
> >To: roottalk@pcroot.cern.ch, rootdev@pcroot.cern.ch
> >Subject: CINT: exceptions on Linux?
> >
> >Hi,
> >
> >I am having some problems throwing exceptions from my compiled objects and
> >catching them, outside cint, in my compiled main(). (Abort, core dumped).
> >Before I start digging into this I just wanted to ask if there are any known
> >issues with this on Linux? I think I simply did something wrong myself, but
> >asking never hurts.  (and I don't have this problem on solaris and on 
> windows.)
> >
> >BTW, On windows, G__STD_EXCEPTION is defined, by default, by the following 
> code
> >in G__ci.h, so I had to uncomment the #define line, otherwise I could not 
> catch
> >exceptions by myself, cint would catch them before I could.
> >
> >#if defined(G__WIN32) && !defined(G__STD_EXCEPTION)
> >#define G__STD_EXCEPTION  // I commented this line out!
> >
> >Thanks,
> >Christoph



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:57 MET