perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Kim <b...@coe.tamu.edu>
Subject Re: error trapping and notice
Date Thu, 15 Apr 2004 13:56:47 GMT
I have the following responses. 

1. error trapping
> Execute({inputfile => 'file.epl', errors => \@errors});
> if (@errors) { Execute('notify_error.epr', \@errors); } 
> In the "notify_error.epr" page you can send a message with all debugging
> data you need like fdat, udat, ENV and etc.

2. errorpage and notice
> First configure your own error page
> ErrorDocument 500 /errors/500.epo
>   [-
>     if ($req_rec && ($prev = $req_rec->prev)) {
>       $errors = $prev->pnotes('EMBPERL_ERRORS');
>       if ($errors && @$errors) {
>         Execute('notify_error.epr', $errors);
>       }
>     }
>   -]
> Second disable the default error page from Embperl
> PerlSetEnv EMBPERL_OPTIONS 262144

3. send out a mail on every error.  (perldoc Embperl::Config)
> Embperl_Mail_Errors_To
> config directive 

Thanks to Luiz and Gerald for the advice. 

We are on 1.3 and are not using Embperl::Object yet. I hope I can use the
above regardlessly. I know I can use Execute, but I'm not familiar about
the extensions epo and epr. What is the pod that explains them?

Thanks,

Ben Kim


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message