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 06:41:44 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!peernews-us.colt.net!newsfeed.news2me.com!newsfeed3.easynews.com!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!crtntx1-snh1.gtei.net!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!dfw-service2.ext.ray.com.POSTED!53ab2750!not-for-mail Newsgroups: comp.unix.tru64 Subject: Re: c++ exception handling From: Scott Schindler References: <7YTUb.10$tv3.0@dfw-service2.ext.ray.com> <87bro8e6bb.fsf@student.uni-tuebingen.de> User-Agent: Xnews/06.08.25 Message-ID: Date: Mon, 09 Feb 2004 14:41:39 GMT NNTP-Posting-Host: 147.24.155.62 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.ray.com 1076337699 147.24.155.62 (Mon, 09 Feb 2004 08:41:39 CST) NNTP-Posting-Date: Mon, 09 Feb 2004 08:41:39 CST Organization: Raytheon Company Xref: archiver1.google.com comp.unix.tru64:11174 Falk Hueffner wrote in news:87bro8e6bb.fsf@student.uni-tuebingen.de: > Scott Schindler 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. > Thank you, Scott