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=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,699cc914522aa7c4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news1.google.com!news.germany.com!feeder.news-service.com!proxad.net!cleanfeed1-b.proxad.net!nnrp1-1.free.fr!not-for-mail Return-Path: From: Duncan Sands To: comp.lang.ada@ada-france.org Subject: Re: Structured exception information Date: Wed, 17 Jan 2007 07:38:47 +0100 User-Agent: KMail/1.9.5 References: <514adpF1i6us0U1@mid.individual.net> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at ada-france.org Cc: Jeffrey Carter X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.9rc1 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.ada Message-ID: X-Leafnode-NNTP-Posting-Host: 88.191.17.134 Organization: Guest of ProXad - France NNTP-Posting-Date: 17 Jan 2007 07:40:01 MET NNTP-Posting-Host: 88.191.14.223 X-Trace: 1169016001 news-3.free.fr 303 88.191.14.223:36939 X-Complaints-To: abuse@proxad.net Xref: g2news2.google.com comp.lang.ada:8214 Date: 2007-01-17T07:40:01+01:00 On Tuesday 16 January 2007 19:07, Jeffrey Carter wrote: > Applying the KISS principle, I'd think the way to do this would be > > with Ada.Exceptions; > generic -- Exceptions_With_Info > type Problem_Info (<>) is limited private; > > with function Image (Value : Problem_Info) return String; > with function Value (Image : String) return Problem_Info; > package Exceptions_With_Info is > procedure Raise_With_Info (ID : in Ada.Exceptions.Exception_ID; > Info : in Problem_Info); > > procedure Raise_With_Info > (Occurrence : in Ada.Exceptions.Exception_Occurrence; > Info : in Problem_Info); > > function Info (Occurrence : Ada.Exceptions.Exception_Occurrence) > return Problem_Info; > end Exceptions_With_Info; The maximum length of an exception message is 200 for GNAT. Best wishes, Duncan.