Re: [RESEND] Trapping errors

2005-02-22 Thread Robert Norris
On Wed, Feb 23, 2005 at 05:28:17AM +0100, Gerald Richter wrote: > > Any way to make this behave more like croak/die? These seem to check if > > their argument is a reference. If it is, they just drop the reference > > into $@, otherwise they add context (line number, etc). > > > > I take a look at

Re: [RESEND] Trapping errors

2005-02-22 Thread Gerald Richter
Hi, > > Any way to make this behave more like croak/die? These seem to check if > their argument is a reference. If it is, they just drop the reference > into $@, otherwise they add context (line number, etc). > I take a look at it if I can change the error handling in this way. I agree that thi

Re: [RESEND] Trapping errors

2005-02-22 Thread Robert Norris
Hi Gerald, Thanks for your reply. On Tue, Feb 22, 2005 at 05:52:33PM +0100, Gerald Richter wrote: > > And then in base.epl, something like this: > > > > eval { Execute('*') }; > > if($@) { > > Execute('error.epl', $@); > > } > > > > Instead use > > Execute({inputfile => '*', options

RE: [RESEND] Trapping errors

2005-02-22 Thread Gerald Richter
> > > Instead use > > > > Execute({inputfile => '*', options => > > Embperl::Constant::optReturnError, > > errors => [EMAIL PROTECTED]) ; > > if (@errors) { > > Execute ( > > } > > > > I've been doing something recently with Execute and > @errors, and I noticed that the @errors array al

Re: [RESEND] Trapping errors

2005-02-22 Thread Martin Moss
> Instead use > > Execute({inputfile => '*', options => > Embperl::Constant::optReturnError, > errors => [EMAIL PROTECTED]) ; > if (@errors) { > Execute ( > } > I've been doing something recently with Execute and @errors, and I noticed that the @errors array also contained any 'warnin

Re: [RESEND] Trapping errors

2005-02-22 Thread Gerald Richter
> > And then in base.epl, something like this: > > eval { Execute('*') }; > if($@) { > Execute('error.epl', $@); > } > Instead use Execute({inputfile => '*', options => Embperl::Constant::optReturnError, errors => [EMAIL PROTECTED]) ; if (@errors) { Execute ( } Gerald