Em Sat, 23 Nov 2002 00:08:09 -0500
Jordan Baker <[EMAIL PROTECTED]> escreveu:

> Aha, well I discovered something by testing tonite.
> 
> I do a couple Execute calls in my base.epl and essentially they hide
> the error from the parent process.
> 
> So I have to find a way to propogate errors.. perhaps there is an
> option to Execute to propogate errors when you call another document
> but it apparently does not work in this case... ie. execution will
> continue.
> 
> So my temporary work around is to rethrow the errors I receive in this
> case...
> 
> The only annoying thing is that I need to do this for any file I
> Execute from the base.epl and it gets a bit redundant.. which is why
> it would be nice to be able to propogate the error back to the top
> unless you have "errors" set to something.
> 
> my $errs = [];
> Execute({inputfile => "*", errors => $errs});
> # rethrow error
> die join("\n", @$errs) if $errs;
> 
> Anyone else using Embperl::Object who has any other advice?? This will
> help me in a basic regard anway so I'm mostly happy :)
> 

Hi,

I use a [$ sub error $] in my base.epl that do do all the error handling
and in the end it exits with a normal exit;

In my other pages after any eval {}; or other error I call that sub with
$req->error('tittle', 'page', $error);

It works fine with Embperl 1.3.4.

Regards,

Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to