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=0.6 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, HK_RANDOM_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ec21c3c7cdc7ff3e X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!cyclone1.gnilink.net!spamkiller.gnilink.net!gnilink.net!trnddc06.POSTED!20ae255c!not-for-mail Newsgroups: comp.lang.ada From: Justin Gombos Subject: Re: Handling invalid objects References: <1142279908.327131.230200@j52g2000cwj.googlegroups.com> <41LSf.4126$TK2.1805@trnddc07> User-Agent: slrn/0.9.8.1 (Linux) Message-ID: <0K1Uf.3182$4N1.524@trnddc06> Date: Wed, 22 Mar 2006 01:27:24 GMT NNTP-Posting-Host: 129.44.77.228 X-Complaints-To: abuse@verizon.net X-Trace: trnddc06 1142990844 129.44.77.228 (Tue, 21 Mar 2006 20:27:24 EST) NNTP-Posting-Date: Tue, 21 Mar 2006 20:27:24 EST Xref: g2news1.google.com comp.lang.ada:3537 Date: 2006-03-22T01:27:24+00:00 List-Id: On 2006-03-20, Randy Brukardt wrote: > >> The quality and style guide advises against them for a good reason; >> exceptions are like gotos - and produce a questionable state. > > The state isn't questionable in this case: you have no legitimate > value to return, so anything you return is garbage. That means there > isn't any state to corrupt. I didn't post an sample body for function hour_of_day return clock_type, so you don't have enough information to be able to conclude whether the state is corrupted. For all we know, hour_of_day is impure and modifies global data, and raises exceptions from multiple points. -- PM instructions: do a C4esar Ciph3r on my address; retain punctuation.