On Sun, 17 Sep 2000, Tom Christiansen wrote:

> >Heh. We can change the message from:
> 
> >"Division by zero error on line xx"
> 
> >to
> 
> >"Division by zero error somewhere around line XX, give or take a few"
> 
> >:)
> 
> >Yup. Worst case we can always point at where the line starts, if it still 
> >exists.
> 
> Make it:
> 
>     Division by zero error on statement beginning at line xx

The reason for the fuzz is that the optimizer could well have munched
things to the point where we're really not sure at runtime what the
correct line is. (Yeah, I know, these are computers and it's all
deterministic, but the optimizations could be mildly lossy in some ways)
 
> Consider multiline constants -- where do you say the warning occurred?
> 
>     print <<EOF;
>     blah
>     blah
>     $fred
>     blah
>     blah

If $fred caused the problem and we've not thrown the info away somewere,
on the exact line $fred appeared. Otherwise on the print line.

                                        Dan

Reply via email to