From: agate!linus!linus.mitre.org!texas!jclander@ucbvax.Berkeley.EDU (Julian C . Lander)
Subject: Re: Language pitfalls (was Re: FORTRAN bug)
Date: 16 Dec 92 20:02:05 GMT [thread overview]
Message-ID: <1992Dec16.200205.8912@linus.mitre.org> (raw)
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
next reply other threads:[~1992-12-16 20:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
1992-12-16 20:02 Julian C . Lander [this message]
-- strict thread matches above, loose matches on Subject: below --
1992-12-17 18:48 Language pitfalls (was Re: FORTRAN bug) John Halper
1992-12-17 14:18 Terry J. Westley
1992-12-17 1:31 Robert I. Eachus
1992-12-16 20:59 John Bollenbacher
1992-12-16 17:38 Bob Kitzberger
1992-12-16 17:27 Mark A Biggar
1992-12-16 16:32 olivea!spool.mu.edu!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!asuvax!ennews
1992-12-16 14:38 crispen
1992-12-16 1:22 Robert I. Eachus
1992-12-15 20:35 news.centerline.com!noc.near.net!inmet!spock!stt
1992-12-15 18:08 Richard Pattis
1992-12-15 15:47 Michael Feldman
1992-12-15 14:55 David Emery
1992-12-15 13:55 enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!news.lth.se!dag
1992-12-14 21:57 Bob Kitzberger
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox