From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,61e9062c1f23b9d5 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!newsfeed2.telusplanet.net!newsfeed.telus.net!edtnps89.POSTED!023a3d7c!not-for-mail Sender: blaak@METROID Newsgroups: comp.lang.ada Subject: Re: contracted exceptions (was Re: Reconsidering assignment) References: <1181165630.012508.55290@i38g2000prf.googlegroups.com> <19fxsxv1god43$.1pqq8vgfu2itn$.dlg@40tude.net> From: Ray Blaak Message-ID: Organization: The Transcend User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 08 Jun 2007 17:44:58 GMT NNTP-Posting-Host: 208.66.252.228 X-Trace: edtnps89 1181324698 208.66.252.228 (Fri, 08 Jun 2007 11:44:58 MDT) NNTP-Posting-Date: Fri, 08 Jun 2007 11:44:58 MDT Xref: g2news1.google.com comp.lang.ada:16118 Date: 2007-06-08T17:44:58+00:00 List-Id: "Martin Krischik" writes: > Stange - I just used to do (in Java and C++): > > void doManyThings() throws ManyErrors, SomeError > { > doSomething(); > } Sure. But the problem with this approach is that clients are impacted and need to have visibility to all of the exception classes, some of which might have been internal, private to the subsystem's implementation. Also, this approach is tolerable for one or two exceptions. If you method is using a lot of libraries, it can get out of hand, and suddenly you need a throws clause with many exceptions. An internal change to method bodies can readily cause new exceptions to be requird, forcing clients to recompile, etc. It becomes a non-trivial maintenance issue. -- Cheers, The Rhythm is around me, The Rhythm has control. Ray Blaak The Rhythm is inside me, rAYblaaK@STRIPCAPStelus.net The Rhythm has my soul.