Re: Exceptions and Objects

[email protected] (Jonathan Scott Duff) Tue, 15 Aug 2000 11:47:03 -0500
Newsgroups perl.perl6.language.flow
Message-ID <[email protected]>
On Tue, Aug 15, 2000 at 11:47:32AM +0100, Graham Barr wrote:
> On Mon, Aug 14, 2000 at 10:56:36AM -0500, Jonathan Scott Duff wrote:
> > 	try { } 
> > 	catch SomeException { }
> > 	catch SomeOtherException { }
> > 	finally { }
> > 
> > which seems to only catch exceptions based on name.
> 
> Yes, but an exception has multiple names as it is a class name
> and you perform ->isa(name)

So are you saying that the above code is really executing something
like this:

	try { }
	catch {
 	    switch ($@) {
		case ^_->isa('SomeException') { }
		case ^_->isa('SomeOtherException') { }
	    }
	}
	finally { }
?

-Scott
-- 
Jonathan Scott Duff
[email protected]