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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,8aaaaeb1690d828b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!b15g2000yqd.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Yannick_Duch=EAne_Hibou57?= Newsgroups: comp.lang.ada Subject: Re: writing on terminal before an exception Date: Sun, 2 Aug 2009 18:13:05 -0700 (PDT) Organization: http://groups.google.com Message-ID: <22b02ab4-e12b-4c59-89ba-7d2e7857cd13@b15g2000yqd.googlegroups.com> References: NNTP-Posting-Host: 86.66.190.11 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1249261985 19070 127.0.0.1 (3 Aug 2009 01:13:05 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 3 Aug 2009 01:13:05 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b15g2000yqd.googlegroups.com; posting-host=86.66.190.11; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7533 Date: 2009-08-02T18:13:05-07:00 List-Id: Hello Mark, On 2 ao=FBt, 19:47, mf...@yahoo.com (Mark Fabbri) wrote: > i have a problem with text_io and exception: > > Text_IO.Put ("No SH3 data."); > Text_IO.New_Line; > raise Sh3_NoData; > > if it raise an exception, the string "NO SH3 data" is not displayed. it > seems that the text_io don't actually print on screen. i also tryed with > text_io.flush after the New_Line, but nothing happens. Its quite common to me to display some informations on the console or via a message box before a statement which raise en exception, while debuging. Perhaps a too much agressive optimizer ? Or else, any redirection anywhere ? I would suggest first to try to remove the raise statement, to see if the string is displayed or not (just to be sure this is really due to the raise statement). If it happens to be confirmed, then insert some other statements between the text I/O operations (some extra statements which would not be Text_IO operations) and the raise statement, to see if it change something. Beside of the latter, another test I would be tempted to do, would be to try to put the text I/O operations and the raise statement, each on a dedicated scope. I mean, ... if the exception is raised after a conditional test like if Condition then Text_IO. .... raise .... end if; then to try if Condition then Text_IO. .... end if; if Condition then raise .... end if; to see if it changes anything Standard questions : what's your OS ? Your compiler ? Always difficult to figure what the trouble is in such strange cases, so I'm sorry if it does not help you as much as would expect, and I just try to imagine some ways to guess where this behaviour comes from. Have a nice time Y.