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,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc745b8412f53f25 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-01 04:38:54 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!fr.ip.ndsoftware.net!proxad.net!usenet-fr.net!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Marius Amado Alves Newsgroups: comp.lang.ada Subject: Re: Error-names. Date: Mon, 1 Mar 2004 12:48:43 +0000 Organization: Cuivre, Argent, Or Message-ID: References: <2Iq0c.15247$aT1.13123@newsread1.news.pas.earthlink.net> Reply-To: amado.alves@netcabo.pt NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: melchior.cuivre.fr.eu.org 1078144666 42064 212.85.156.195 (1 Mar 2004 12:37:46 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Mon, 1 Mar 2004 12:37:46 +0000 (UTC) To: Martin Klaiber , comp.lang.ada@ada-france.org Return-Path: User-Agent: KMail/1.4.3 In-Reply-To: X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:5973 Date: 2004-03-01T12:48:43+00:00 > > function Get_Error_Code (E : Ada.Exceptions.Exception_Occurrence) > > return C_Integer is > > begin > > Ada.Exceptions.Raise_Exception (E) > > exception > > when Program_Error =3D> return Program_Error_Code; > > when Constraint_Error =3D> return Constraint_Error_Code; > > ... > > when others =3D> return Unexpected_Error_Code; > > end Get_Error_Code; > > Doesn't work here. Raise_Exception (E) causes the error: > > libopensteuer.adb:24:18: expected private type > "Ada.Exceptions.Exception_Id" libopensteuer.adb:24:18: found private ty= pe > "Ada.Exceptions.Exception_Occurrence" E'Identity or Exception_Identity (E) instead of just E in the call to=20 Raise_Exception should solve the problem.