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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.140.176.215 with SMTP id w206mr22933445qhw.10.1453129555304; Mon, 18 Jan 2016 07:05:55 -0800 (PST) X-Received: by 10.182.231.229 with SMTP id tj5mr281687obc.13.1453129555269; Mon, 18 Jan 2016 07:05:55 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!94no5968921qgt.1!news-out.google.com!l1ni17448igd.0!nntp.google.com!h5no6296559igh.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 18 Jan 2016 07:05:55 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=57.79.21.1; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG NNTP-Posting-Host: 57.79.21.1 References: <77e47c8b-7dcc-4e86-8f89-1f348cdf08dd@googlegroups.com> <888e0bed-6d19-4ab6-84e7-67dd2f227407@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <73c2bbe1-15fc-4c29-b500-fb0a637abd91@googlegroups.com> Subject: Re: Re-write a file in Ada From: gautier_niouzes@hotmail.com Injection-Date: Mon, 18 Jan 2016 15:05:55 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:29148 Date: 2016-01-18T07:05:55-08:00 List-Id: Le lundi 11 janvier 2016 18:18:48 UTC+1, Brian Drummond a =E9crit=A0: > > raised ADA.IO_EXCEPTIONS.END_ERROR : a-tigeli.adb:96 >=20 > In outline, when you see this sort of error, find the installation's "Ada= =20 > include directory" which contains the named file... >=20 > locate a-tigeli.adb > /usr/lib/gcc/x86_64-linux-gnu/4.9/rts-native/adainclude/a-tigeli.adb >=20 > open in editor (read only) ... and see > -- A D A . T E X T _ I O . G E T _ L I N E -- > so we know the error occurred in "Get_Line" >=20 > And look at line 96: >=20 > function Get_Chunk (N : Positive) return Natural is > ...blah... > else > raise End_Error; > end if; >=20 > Looks like we ran out of file somehow. From here on it's usually=20 > straightforward. Sure - but all that investigation effort brings nothing: the exception's na= me gives already this hint: the end of a file was reached. The fact that it= raised somewhere in the run-time library is obvious and brings zero inform= ation for finding the bug: no indication is given about where the exception= occurred in the program. It's a shame that GNAT doesn't switch on its trac= e-back by default, IMHO. The current setup is disturbing for beginners and = cumbersome for people using GNAT for larger programs. _________________________ Gautier's Ada programming http://gautiersblog.blogspot.com/search/label/Ada NB: follow the above link for a valid e-mail address