From -3954966526527412744
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f78e5,e445fe05b100a0aa,start
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-08-02 08:51:02 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!kibo.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: Dan Moinescu <dan_moinescu@yahoo.com>
Newsgroups: comp.std.c++
Subject: C++ exception handling
Date: Fri,  2 Aug 2002 15:50:25 GMT
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <20020802141846.59203.qmail@web9902.mail.yahoo.com>
X-Trace: mail2news.demon.co.uk 1028303431 mail2news:16161 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mulga.cs.mu.OZ.AU id BAA23538
Lines: 43
Xref: archiver1.google.com comp.std.c++:12988

Hello everyone,

Are there any plans to change the C++ standard to
force exception specifications being checked at
compile-time (as Java does), rather than at run-time?

I recently had to change the exception specification
of a library function. Since this change is not
detected during compilation at all, I have to manually
check the code where that function is called in order
to accommodate the new exceptions. As you can imagine,
that=92s a nightmare. In the Java exception model, any
exception thrown inside a function must be either
caught or declared in the function=92s throw list
(that=92s enforced during compilation). Had that been
the case with C++, a simple compilation of the
projects would have detected the all the places where
the new exceptions are thrown and not caught.
Also, I believe such a change would help improve the
quality of the C++ code that uses exceptions.
Currently, if an exception is omitted from a catch
block, no indication of that is given at compilation.
If you=92re lucky, the bug is discovered during testing;
if not, it goes on undetected. And when the exception
does eventually occur, the application will not be
able to provide any indication of where exactly the
exception occurred.

Best regards,
Dan Moinescu.


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



