[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

RE: A common base exception object for Perl - RFC



As mentioned elsewhere, I already have ref-array exceptions. I or someone
else could easily have blessed non-Exception exceptions. I would strongly
encourage always checking for $@->isa('Exception') before calling methods of
Exception on $@.

-----Original Message-----
From: Pete Jordan [mailto:pjordan1@email.mot.com]
Sent: Thursday, January 20, 2000 12:07 PM
To: Perl5 Porters
Subject: Re: A common base exception object for Perl - RFC


>         if ( blessed($@) and $@->isa('Exception') ) { confess $@ }

Even without dodgy pseudo-SIG processing,

	blessed $@ and $@->croak

should do. The whole point of all this is that if C<$@> isn't a string,
it's an Exception or a subclass thereof... (Anybody using a prior
exception system will already have code to handle it.)


[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]