From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,e76a94c6438141e2 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2004-02-09 05:25:15 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news2.telebyte.nl!news-fra1.dfn.de!newsfeed.hanau.net!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Falk Hueffner Newsgroups: comp.unix.tru64 Subject: Re: c++ exception handling Date: 09 Feb 2004 14:22:16 +0100 Organization: T-Online Sender: falk@juist Message-ID: <87bro8e6bb.fsf@student.uni-tuebingen.de> References: <7YTUb.10$tv3.0@dfw-service2.ext.ray.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.t-online.com 1076332936 01 6861 88jHGX-loduUnoo 040209 13:22:16 X-Complaints-To: usenet-abuse@t-online.de X-ID: b0mwDwZLYeLPTvpwoqQNOddf9ZvyzER48fFH-n5n-AFTBPBRJV0-g1 X-Face: "iUeUu$b*W_"w?tV83Y3*r:`rh&dRv}$YnZ3,LVeCZSYVuf[Gpo*5%_=/\_!gc_,SS}[~xZ wY77I-M)xHIx:2f56g%/`SOw"Dx%4Xq0&f\Tj~>|QR|vGlU}TBYhiG(K:2 writes: > I am trying to test an exception handling scheme in c++ on a unix machine > (uname -a produces the following output: OSF1 *removed* V5.1 1885 alpha > alpha) > > int numerator(100); > int denominator(0); > // Should cause an exception to occur. The C++ language says behaviour of division by zero is undefined; some environments produce an exception for it, but you cannot rely on that for portable programs. > I am not sure that I want to implement the second method. Is there > a pure c++ way of having the program catch the exception. No. -- Falk