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: Ken Garlington Subject: Re: Ada and Automotive Industry Date: 1996/12/23 Message-ID: <32BEEB1F.3557@lmtas.lmco.com>#1/1 X-Deja-AN: 205646689 references: <32B8AF89.CA@lmtas.lmco.com> content-type: text/plain; charset=us-ascii organization: Lockheed Martin Tactical Aircraft Systems mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 3.01 (Win95; U) Date: 1996-12-23T00:00:00+00:00 List-Id: Robert Dewar wrote: > > Ken says > > "Actually, I like to raise Program_Error when this happens. Its' roughly > equivalent to the "WTF?" message we used to generate in our FORTRAN > tools > when we reached a condition in the program that "shouldn't happen."" > > I prefer to make the distinction that the RM makes. Program_Error is raised > for logic errors in your program, which should never occur. Constraint_Error > is raised for an incorrect value that is outside the domain or range of > a basic operation. Certainly. (I didn't get to see the original message, stating that the error in question was a Constraint_Error.) In any case, I don't see any problem with raising pre-defined exceptions, assuming: 1. The error is consistent with the definition in the RM, and 2. It's something that should be propagated instead of handled. > > It is of course true that this is not a well defined sharp line! -- LMTAS - The Fighter Enterprise - "Our Brand Means Quality" For job listings, other info: http://www.lmtas.com or http://www.lmco.com