Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #33171] IMCC Error When Reading Past EOF

11 views
Skip to first unread message

Matt Diephouse

unread,
Dec 23, 2004, 2:02:16 PM12/23/04
to bugs-bi...@rt.perl.org
# New Ticket Created by Matt Diephouse
# Please include the string: [perl #33171]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=33171 >


Reading past the EOF in PIR results in the following error:

File not found
in file '(unknown file)' near line -1

That's less than helpful. Or at least less helpful than it could be. A
better error would be really nice.

--
matt diephouse
http://matt.diephouse.com

Matt Diephouse

unread,
Jan 31, 2005, 8:03:42 AM1/31/05
to perl6-i...@perl.org

The attached patch changes the error to:

  Cannot read line from empty filehandle

I hope that's truthful in all circumstances.

It also changes the function used to raise the exception from
real_exception to internal_exception (in order to avoid "in file
'(unknown file)' near line -1"). I'm not sure if that's right, but I
didn't know where to look on the subject.

readline_error.patch

Leopold Toetsch

unread,
Feb 1, 2005, 5:18:11 AM2/1/05
to ma...@diephouse.com, perl6-i...@perl.org
Matt Diephouse <mdd...@gmail.com> wrote:

> The attached patch changes the error to:

> Cannot read line from empty filehandle

Done.

> It also changes the function used to raise the exception from
> real_exception to internal_exception

We've to change a lot of internal_exceptions to real ones eventually and
print better diagnostics, so no.

leo

Matt Diephouse

unread,
Feb 2, 2005, 3:45:52 PM2/2/05
to l...@toetsch.at, perl6-i...@perl.org
Leopold Toetsch <l...@toetsch.at> wrote:

> Matt Diephouse <mdd...@gmail.com> wrote:
> > It also changes the function used to raise the exception from
> > real_exception to internal_exception
>
> We've to change a lot of internal_exceptions to real ones eventually and
> print better diagnostics, so no.

That still results in "in file (unknown) near line -1" being printed
as part of the error message, so I'm leaving this ticket open. (It
annoys me.)

> leo

Leopold Toetsch

unread,
Feb 3, 2005, 2:56:09 AM2/3/05
to ma...@diephouse.com, perl6-i...@perl.org
Matt Diephouse <mdd...@gmail.com> wrote:

> That still results in "in file (unknown) near line -1" being printed
> as part of the error message, so I'm leaving this ticket open. (It
> annoys me.)

*g*

I've changed now the policy for including source line information.
Unless -O is given file and line info is included in the PBC.

leo

Matt Diephouse

unread,
Feb 3, 2005, 11:27:28 PM2/3/05
to l...@toetsch.at, perl6-i...@perl.org

Great, thanks. Ticket closed.

0 new messages