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-Thread: 103376,7412f02e681a5ea5,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!38g2000cwa.googlegroups.com!not-for-mail From: "REH" Newsgroups: comp.lang.ada Subject: program_error Date: 29 May 2006 09:12:38 -0700 Organization: http://groups.google.com Message-ID: <1148919158.370302.292760@38g2000cwa.googlegroups.com> NNTP-Posting-Host: 192.91.173.42 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1148919163 30999 127.0.0.1 (29 May 2006 16:12:43 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 29 May 2006 16:12:43 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 38g2000cwa.googlegroups.com; posting-host=192.91.173.42; posting-account=lnUIyw0AAACoRB2fMF2SFTIilm8F10q2 Xref: g2news2.google.com comp.lang.ada:4587 Date: 2006-05-29T09:12:38-07:00 List-Id: Can anyone see a problem with this code? It works fine with GNAT, but GreenHills raises a program_error exception on the 'write line. I am trying to write an exception occurrence to a simple memory stream. It doesn't seem to even make it into my streams write procedure. I also tried changing the code to use an exception ID instead, but fails in the same way. Thanks, REH with Text_IO; use Text_IO; with Ada.Exceptions; with Asp.Rpc.Memory_Stream; procedure hello is package MS renames Asp.Rpc.Memory_Stream; S : aliased MS.Stream_Type(1000); begin put_line("Main starting..."); begin raise Constraint_Error; exception when O : others => Put_Line("Exception caught in block: " & Ada.Exceptions.Exception_Name(O)); Ada.Exceptions.Exception_Occurrence'Write(S'Access, O); end; put_line("Main done."); exception when O : others => Put_Line("Exception caught in Main: " & Ada.Exceptions.Exception_Name(O)); end;