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

Re: A common base exception object for Perl - RFC



"Redford, John" wrote:

> I forgot to mention.. you said that 'exitcode' & 'text' were things
> that already existed. Are they? Where are there? When I say 'die "foo"',
> where is an exitcode coming from?

perlfunc> Outside an eval(), prints the value of LIST to STDERR and
exits
perlfunc> with the current value of $! (errno). If $! is 0, exits with
the
perlfunc> value of ($? >> 8) (backtick `command` status). If ($? >> 8)
is
perlfunc> 0, exits with 255.

Thus I use this behaviour if no explicit exit code is supplied when the
exception is created.

> Right now I am using ref-array exceptions in some code. There is no
> textual representation of the exceptions.

Fair point. OK, you've convinced me. I can derive a structure from
Graham's C<Error> module - a bare framework base class and
C<Exception::Simple> which would implement what I originally described.

Pete
-- 
use Disclaimer::Standard;	# Motorola GSM Software Factory
my $phone='+44 1793 564450';	# "'Not twisted,' Salzy once said of
my $fax='+44 1793 566918';	#  her own passion, 'it is helical.
my $mobile='+44 7973 725120';	#  That sounds better.'"


Follow-Ups from:
Stephen Zander <gibreel@pobox.com>
References to:
"Redford, John" <John.Redford@fmr.com>

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