From: un1t AT rz DOT uni-karlsruhe DOT de (Matthias Baas) Newsgroups: comp.os.msdos.djgpp Subject: Re: exceptions in djgpp incomplete Date: Wed, 26 Feb 1997 17:35:22 GMT Organization: University of Karlsruhe, Germany Lines: 22 Message-ID: <5f1s9n$3ba$2@nz12.rz.uni-karlsruhe.de> References: <6RYughwjoNB AT jth DOT ping DOT de> NNTP-Posting-Host: rzstud2.rz.uni-karlsruhe.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp jth AT jth DOT ping DOT de (Jens Theisen) wrote: >I have noticed that exception handling in djgpp isn't fully supported, at >least not in my version 2.7.2. Exceptions can only be caught as they are >thrown. No exception handler can catch a subclass from the class he wants >to have. I have testet a trivial program on both djgpp, gcc under linux >and watcom c++. Watcom C++ behaves the Stroustrup way, both other simply >don't catch my exception. Add the compiler option -frtti (rtti=Run-Time Type information) and #include on top of your programs, then you're able to catch derived classes just by specifying the base class. >Besides, my djgpp sometimes crashes when dealing with exceptions, although >this need not necessarily be the fault of djgpp. Did you use fstreams? My programs always crash when I try to use fstreams and exception handling. - Matthias -