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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ea2b3498720dfde1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-27 19:59:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!iad-peer.news.verio.net!news.verio.net!iad-read.news.verio.net.POSTED!not-for-mail From: Dr Nancy's Sweetie Subject: Re: Good Ada Style For Impossible Actions? Newsgroups: comp.lang.ada References: <3DBB0508.6010707@acm.org> Organization: Rowan College of New Jersey User-Agent: tin/1.4.6-20020816 ("Aerials") (UNIX) (SunOS/5.8 (sun4u)) Message-ID: <8w2v9.20054$T_.485432@iad-read.news.verio.net> Date: Mon, 28 Oct 2002 03:52:36 GMT NNTP-Posting-Host: 150.250.64.69 X-Complaints-To: abuse@verio.net X-Trace: iad-read.news.verio.net 1035777156 150.250.64.69 (Mon, 28 Oct 2002 03:52:36 GMT) NNTP-Posting-Date: Mon, 28 Oct 2002 03:52:36 GMT Xref: archiver1.google.com comp.lang.ada:30178 Date: 2002-10-28T03:52:36+00:00 List-Id: Jeffrey Carter wrote, in reply to a question about when to use exceptions and functions for testing error conditions: > It sounds as if you could have mouse events outside the proper window > at any time, so such an event would not be exceptional. So having a > function would probably be a good idea. > > But if you use the function and still get a mouse event outside the > proper window, you should also have an exception to indicate that. If the function tries to compute a logical address for an invalid mouse position, a CONSTRAINT_ERROR will be raised because the logical position will be outside its valid range. Is there a good heuristic for "raise your own exception" and "don't clutter up the exception namespace"? Darren Provine ! kilroy@elvis.rowan.edu ! http://www.rowan.edu/~kilroy "C++ is like jamming a helicopter inside a Miata and expecting some sort of improvement." -- Drew Olbrich