At 02:01 PM 8/16/00 -0500, Jonathan Scott Duff wrote:
>On Wed, Aug 16, 2000 at 11:46:12AM -0700, Peter Scott wrote:
> > At 12:10 AM 8/16/00 -0500, Jonathan Scott Duff wrote:
> > >Why not have a special array that acts as an exception stack and each
> > >exception knows what file/line/whatever?  Then you can get both behaviors
> > >with a simple for loop:
> > >
> > >         for (@PERL::EXCEPTIONS) {
> > >             print $_->file, "\t", $_->line, "\n";
> > >         }
> >
> > Because there isn't a stack of exceptions; I'm talking about tracking the
> > movement of a single exception.
> >
> > This feature gets repeatedly confused with the RFC 88 exception stacking
> > feature.
>
>If true, then perhaps this feature needs more explanation  :-)
>
>I can almost see what you're talking about but not quite.  It sounds
>like you want caller() info available to the exception handler ... but
>isn't it?

I know that it doesn't work when I use Error.pm; if I have multiple nested 
try blocks then I want to see the line numbers of each place an exception 
that they didn't handle passed through on its way back up to me.  Now, 
caller() says it handles evals, and Error.pm uses evals, so I don't know 
what's wrong.

You have a point, though; simply requiring caller() to do the right thing 
in this case would be enough.
--
Peter Scott
Pacific Systems Design Technologies

Reply via email to