Re: Toward an omnibus Perl 6 Exceptions RFC, v0.1.
[email protected] (Jonathan Scott Duff) Wed, 16 Aug 2000 00:10:28 -0500
| Newsgroups | perl.perl6.language.flow,perl.perl6.language.errors |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 15, 2000 at 05:14:56PM -0700, Peter Scott wrote:
> You want: while handling an exception, throwing another exception pushes
> the first one onto a stack which could be reported en masse when the coup
> de gras arrives. Like VMS error cascading. You do this with a _link
> attribute of exceptions. Cool, I can dig that.
>
> I want: exceptions to contain 'file' and 'line' attributes which are arrays
> that get a location pushed on every time an exception bubbles up through a
> scoping level, so that e.g.:
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";
}
-Scott
--
Jonathan Scott Duff
[email protected]