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,a3ca574fc2007430 X-Google-Attributes: gid103376,public From: Ted Dennison Subject: When to raise predefined exceptions (was: Ada and the Automotive Industry) Date: 1996/12/20 Message-ID: <32BA9772.2781E494@escmail.orl.lmco.com>#1/1 X-Deja-AN: 205094426 references: content-type: text/plain; charset=us-ascii organization: Lockheed Martin Information Systems mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 3.0 (X11; I; SunOS 4.1.3_U1 sun4m) Date: 1996-12-20T00:00:00+00:00 List-Id: Robert I. Eachus wrote: > > So my rule on explicitly raising predefined exceptions is that I > will raise them either if the meaning is the predefined meaning of > that exception, or if suppression of a language defined check, either > explicitly or through 11.6, will potentially suppress the exception. I guess that is what I was getting at. There have been times where I wanted to consider certian values out of range for a type, but the only way to do it was to explicitly check for those values. It seemed pointless to create a new exception to raise, when any reasonable handler for this situation would just have to handle *both* Constraint_Error and my new exception. -- T.E.D. | Work - mailto:dennison@escmail.orl.lmco.com | | Home - mailto:dennison@iag.net | | URL - http://www.iag.net/~dennison |