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 there was a problem do return "OK"
there to cancel execution without generating a 500 error but this would be a
pain to manage.

I found an easier solution - which may of course not be the 'best' one: I
still call die in my custom error handling routine which generates a 500
error. But I've used the Apache ErrorDocument directive to kill of the
default error message and replace it with my own (I found out it takes text
as well as a file).  I just pass it a period, and that's it. 

Thanks again

regards
Kropotkin






Perrin Harkins wrote:
> 
> 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();
> 
> - Perrin
> 
> 

-- 
View this message in context: 
http://www.nabble.com/die-problem-in-mod_perl-tp19462854p19464258.html
Sent from the mod_perl - General mailing list archive at Nabble.com.

Reply via email to