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

Re: A common base exception object for Perl - RFC



Pete Jordan writes:
: > Why say
: >         $@->isa('PerlError') and $@->CriticalError
: > instead of
: >         $@->isa('CriticalError')
: > ?
: 
: Fair point, again. An alternative would be (given that
: C<$@->isa(Exception)> will it seems always be true) to have a C<class>
: method that would default to the package name but be settable to an
: arbitrary string. Perl could use the latter facility for internal error
: categorisation. You'd lose any hierarchy of exception classes but gain
: performance by not having to do isa searches.

I wouldn't worry much about performance on exception processing.  They
are, after all, supposed to be exceptional.  With exception processing
we should be striving for correctness over speed, rather than speed
over correctness like we usually do.  :-)

Larry


References to:
Pete Jordan <pjordan1@email.mot.com>

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