Re: die problem in mod_perl

2008-09-12 Thread kropotkin
Hi Perrin I'll look at it. Thanks. Kropotkin. Perrin Harkins wrote: > > On Fri, Sep 12, 2008 at 6:38 PM, kropotkin <[EMAIL PROTECTED]> > wrote: >> Just one problem though - print STDERR is printing the message to the >> main >> server error log not the virtual host error log. die printed it

Re: die problem in mod_perl

2008-09-12 Thread Perrin Harkins
On Fri, Sep 12, 2008 at 6:38 PM, kropotkin <[EMAIL PROTECTED]> wrote: > Just one problem though - print STDERR is printing the message to the main > server error log not the virtual host error log. die printed it to the > virtual host error log. Yeah, that was bad advice. You should probably use

Re: die problem in mod_perl

2008-09-12 Thread kropotkin
Hi Perrin Thanks again. This is most helpful. I've now wrapped the top level call in an eval block and that works fine. Just one problem though - print STDERR is printing the message to the main server error log not the virtual host error log. die printed it to the virtual host error log. It doe

Re: die problem in mod_perl

2008-09-12 Thread Perrin Harkins
On Fri, Sep 12, 2008 at 5:14 PM, kropotkin <[EMAIL PROTECTED]> wrote: > True; I could pass return values > back up the chain and at the top-level if there was a problem do return "OK" > there to cancel execution without generating a 500 error but this would be a > pain to manage. Then catch the di

Re: die problem in mod_perl

2008-09-12 Thread kropotkin
Hi Perrin Thanks. The problem is that all this is happening in a function which has itself been called by another function and this in turn by another. So; if I do: return "OK"; the calling function gets this not Apache. True; I could pass return values back up the chain and at the top-level if

Re: die problem in mod_perl

2008-09-12 Thread Perrin Harkins
On Fri, Sep 12, 2008 at 3:46 PM, kropotkin <[EMAIL PROTECTED]> wrote: > Then I want to stop the script executing any further and ideally to write to > the server error logs. So the last line of my error handling routine is: > die $error_message. Make that: print STDERR $error_message; return OK()

die problem in mod_perl

2008-09-12 Thread kropotkin
Hi I have an eval block in my code which handles an error by calling a routine. This does various things - like email me the error. It also prints a user friendly message to the browser. This is all fine. Then I want to stop the script executing any further and ideally to write to the server er