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
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.
> 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
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
> 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
Great, thanks. Ticket closed.