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,9b2046241520981f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-28 05:39:28 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!82-43-33-75.cable.ubr01.croy.blueyonder.co.UK!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: Ada 0x, exception idea ? Date: Mon, 28 Jul 2003 13:41:29 +0100 Message-ID: References: <3F229597.3090909@myob.com> <87smorj3kp.fsf@inf.enst.fr> NNTP-Posting-Host: 82-43-33-75.cable.ubr01.croy.blueyonder.co.uk (82.43.33.75) X-Trace: news.uni-berlin.de 1059395967 21411839 82.43.33.75 (16 [25716]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Xref: archiver1.google.com comp.lang.ada:40897 Date: 2003-07-28T13:41:29+01:00 List-Id: "Samuel Tardieu" wrote in message news:87smorj3kp.fsf@inf.enst.fr... > How would you integrate this with Ada.Exceptions.Raise_Exception? > (to attach an error message to the exception occurrence) > > RAISE [exception_name] WITH [exception_message] [WHEN expression] ? > Would expression be evaluated before or after exception_message? Would > exception_message be evaluated at all if the test is wrong? I don't think I would want to go so far, and I'm 99% certain the ARG wouldn't even consider it (for the next revision). If you want a message, you just have to write: if condition then Ada.Exceptions.Raise_Exception(exception'Identity,message); end if; Too bad. I think a typical debugging package would have an inlined procedure such as: Ensure( condition[, message] ); which would test the 'condition', and raise e.g. Debugging_Error if it is false, setting the exception's message to 'message' if supplied. -- Nick Roberts Jabber: debater@charente.de [ICQ: 159718630]