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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fc050a66c3b5d87d X-Google-Attributes: gid103376,public X-Google-Thread: 1094ba,86e8c626be2471ae X-Google-Attributes: gid1094ba,public From: Geoff Bull Subject: Re: F9X twister & ADA (was: n-dim'l vectors) Date: 2000/04/12 Message-ID: <38F3D1D3.416B3493@research.canon.com.au>#1/1 X-Deja-AN: 609906107 Content-Transfer-Encoding: 7bit References: <8cctts$ujr$1@nnrp1.deja.com> <38EA0440.1ECBC158@ncep.noaa.gov> <38ED4ECA.ADB698C9@sdynamix.com> <38F28A85.53809F39@sdynamix.com> <38F2C1DC.5538F9F0@research.canon.com.au> <5jJI4.297$PV.9915@bgtnsc06-news.ops.worldnet.att.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@research.canon.com.au X-Trace: cass.research.canon.com.au 955503028 22313 203.12.174.227 (12 Apr 2000 01:30:28 GMT) Organization: Canon Information Systems Research Australia Mime-Version: 1.0 NNTP-Posting-Date: 12 Apr 2000 01:30:28 GMT Newsgroups: comp.lang.fortran,comp.lang.ada Date: 2000-04-12T01:30:28+00:00 List-Id: James Giles wrote: > Better: each procedure in the call tree should either explicitly handle > exceptions or *explicitly* pass them to its (immediate) caller. If neither, > the program should halt right there. This is essentially the Java approach, except for the halt feature (Java doesn't allow the situation to occur where halt would occur). The problem with this is it makes code maintenace a disaster. Say you modify a routine and decide it should be changed so it now raises an exception. You then need to to go fix every place that routine is used to propagate the exception up to some upper level where you want to handle it. Handling may be as simple as: when others => Put_line ("Internal error: contact vendor); which to me is a lot better than the program simply halting in the middle of nowhere. I can't see the advantage of halting immediately, if you want to halt just don't provided exception handlers. Apart from its Exception, Java includes a throwable Error, which is analagous to Ada's exception in that you are not forced to explicitly deal with it. I find Java's exceptions a pain, often when I catch them I just raise an Error - I can't halt by calling System.exit() because I need to catch the Error at the top level and do an orderly cleanup (e.g. flush files). > Mystically skipping over several > levels of the call tree is messy. I don't understand what you mean here. Cheers Geoff