home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!spool.mu.edu!agate!linus!linus.mitre.org!texas!jclander
- From: jclander@texas.mitre.org (Julian C. Lander)
- Subject: Re: Language pitfalls (was Re: FORTRAN bug)
- Message-ID: <1992Dec16.200205.8912@linus.mitre.org>
- Sender: news@linus.mitre.org (News Service)
- Nntp-Posting-Host: fkuhl-pc.mitre.org
- Reply-To: jclander@texas.mitre.org (Julian C. Lander)
- Organization: The MITRE Corporation, McLean, Va
- References: <1992Dec15.135539.7245@lth.se> <EMERY.92Dec15095542@dr_no.mitre.org> <1992Dec15.180821.17817@beaver.cs.washington.edu> <1992Dec15.203558.18211@inmet.camb.inmet.com> <EACHUS.92Dec15202249@oddjob.mitre.org> <256@visicom.com>
- Date: Wed, 16 Dec 1992 20:02:05 GMT
- Lines: 29
-
- In article <256@visicom.com>, rlk@VisiCom.COM (Bob Kitzberger) writes:
- |> eachus@oddjob.mitre.org (Robert I. Eachus) writes:
- |>
- |> > (What Robert Dewar and I objected to was that certain functions
- |> >whose only intended effect is to raise an exception must still contain
- |> >a return statement. This results in junk return statements in stubbed
- |> >out code, and makes a stubber much harder to write.)
- |>
- |> Robert, I can't think of a reason to have a function that does nothing
- |> but raise an exception... can you provide an example? (I'm not
- |> questioning the need for it -- just curious)
- |>
-
- I didn't write this one, but it is in some code I'm using.
- The situation is interface with C-language functions, which return
- error codes. The chunk of code before me (I don't know a good noun
- for what it is--it builds about 3 different executables) has a function
- called Raise_Appropriate_Exception, which raises the exception
- corresponding to the return code it has been passed.
-
- Since it never gets a 0 (its caller should avoid that), it doesn't return.
-
- I don't know that it's the best solution to the problem (I'm not wild
- about it, frankly), but that's what I have.
-
- Julian C. Lander
- jclander@mitre.org
-
-
-