Mailing List Archive

Error line numbers do not seem to map correctly to source code
I am seeing errors in my apache logs which appear to be within Embperl
code, and yet the error line numbers do not match up with what is in the
code. For example, I might see

Can't call method "prepare" on an undefined value at line 182 in Docs.epl

But at line 182, that is in the middle of the qq{} for preparing a query
- i.e. it's not calling prepare at that line. It's true there is a
prepare statement nearby, but then again I have prepare statements
peppered throughout my code. It doesn't seem to be a simple "off by one"
error.

Has anybody else seen this kind of problem? It's not always wrong -
sometimes I can see that the line has a call to the function mentioned
in the error. Other times it seems to be referring to the preceding
line. But other times, like in the first example, it just seems to be
pointing to the middle of a multiline qq{} (i.e. text).

This is with latest Embperl 2.3, built from tarball.

Thanks,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: Error line numbers do not seem to map correctly to source code [ In reply to ]
Hi Neil,

> I am seeing errors in my apache logs which appear to be
> within Embperl
> code, and yet the error line numbers do not match up with
> what is in the
> code. For example, I might see
>
> Can't call method "prepare" on an undefined value at line 182
> in Docs.epl
>
> But at line 182, that is in the middle of the qq{} for
> preparing a query
> - i.e. it's not calling prepare at that line. It's true there is a
> prepare statement nearby, but then again I have prepare statements
> peppered throughout my code. It doesn't seem to be a simple
> "off by one"
> error.

I see various permutations of this as well with 2.2. Generally though I
haven't spent much time looking into it as its usually pretty obvious
where the nearby line of code is (usually within one or two statements).

As you say, it certainly can be a little frustrating if you've got
multiple possible culprit statements nearby :)

Idly, I wonder if its an Embperl::Object-specific issue or Embperl code
in general. Anyone else seen this? Are you using E::Object?

Cheers,

Andrew


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org