You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Chris Ochs <ch...@paymentonline.net> on 2004/03/21 04:30:37 UTC

catching server errors

I have an application that lets users load their own modules into it.
Following is the code I use to run it under Safe.pm:

$result = $safe->reval(require "$file.pm", $obj = $mod->new,
$obj->$command);

Problem is if there is a compilation or runtime error, I cant' figure out
how to catch it so I can log it or print the error to the screen.  I can't
wrap it in an eval because for some reasons I don't completely understand it
masks the opcodes that safe is trying to restrict access to.

Chris


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: catching server errors

Posted by Perrin Harkins <pe...@elem.com>.
On Sat, 2004-03-20 at 22:30, Chris Ochs wrote:
> Problem is if there is a compilation or runtime error, I cant' figure out
> how to catch it so I can log it or print the error to the screen.  I can't
> wrap it in an eval because for some reasons I don't completely understand it
> masks the opcodes that safe is trying to restrict access to.

Hmm, this doesn't sound like it has anything to do with mod_perl.  Maybe
you should ask about Safe on a general Perl list, or on usenet.

- Perrin


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html