Re: Error Handling/Reporting

2003-06-17 Thread Dale Lancaster
ror template my $file = "blank_app_error.html" ; print "Can't open error file *$ENV{SITE_ROOT}/html/$file* :: $msg" if !-e "$ENV{SITE_ROOT}/html/$file" ; set_message("Error in error handling: $msg") ; my $text = qq{

Error Handling/Reporting

2003-06-17 Thread Martin Moss
All, I've been hunting the web for mechanisms whereby I can trap errors from my mod perl objects and report them back to a user nicely, log them AND possibly send reports back to me. Before I started hunting I thought it would be a simple process to use the eval mechanism to run my scripts and th

Re: Error Handling

2002-06-18 Thread Stas Bekman
Gregory Matthews wrote: > Thank you for the link. [Gregory, please remember to keep the threads on the list and not to take them private without being asked to and worse, not sharing the knowledge with the rest of the community] > This is the route I would like to go (My::Exeption). Could you

Re: RFC: Apache::Carp - Error Handling under mod_perl

2000-12-01 Thread Matt Sergeant
On Fri, 1 Dec 2000, Gunther Birznieks wrote: > The other thing that worries me is that even if you sneak the code back > into the PageKit hierarchy you are still not doing everything Lincoln is > doing to help deal with eval issues. This is a particularly thorny problem > (and I suspect part of t

Re: RFC: Apache::Carp - Error Handling under mod_perl

2000-11-30 Thread Thomas J. Mather
Yes it would be useful to have an Apache::Carp as Gunther described it, but I don't really have the time right now to develop it. Maybe I'll get the time to later, but in the meanwhile, I'll stick with the current module in PageKit (it works well with code written under PageKit). If anybody else

Re: RFC: Apache::Carp - Error Handling under mod_perl

2000-11-30 Thread Gunther Birznieks
I didn't mean for you to withdraw. I would encourage you to still make it Apache::Carp. But then to avoid confusion model it more after CGI::Carp while adding the features you wanted for Apache::PageKit. As a person who has hacked and debugged the internals of CGI::Carp and looking at your co

Re: RFC: Apache::Carp - Error Handling under mod_perl

2000-11-30 Thread Thomas J. Mather
OK, I think Apache::Carp was a misleading name - it is not really a replacement for CGI::Carp - instead it is a simple module for reporting errors under a mod_perl enviroment that is easy to use and doesn't require that the programmer use carp and croak. A better name would have been something l

Re: RFC: Apache::Carp - Error Handling under mod_perl

2000-11-30 Thread Gunther Birznieks
OK, I can see the advantage of the Apache specific stuff. However, in looking at your code, I think you may not be taking into account a lot of eval logic that CGI::Carp has. Eval logic is the hardest to get right (and I bet there are still bugs) because SIG die is still called within an eval.

Re: RFC: Apache::Carp - Error Handling under mod_perl

2000-11-30 Thread Thomas J. Mather
; my $i = 0; while (my ($package, $filename, $line, $subr) = caller($i)){ print "stack $i: $package $subr line $line\n"; $i++; } print qq{}; } } sub warn { &errorMessage($_[0],"WARN"); } sub die { &errorMessage($_[0],&qu

Re: RFC: Apache::Carp - Error Handling under mod_perl

2000-11-30 Thread Thomas J. Mather
Sure. I have attached Apache/Carp.pm, so you can examine it. Some of the main differences that can't be implemented easily under CGI are: * Apache::Carp can be configured in the httpd.conf file to send an e-mail to the server admin by setting 'PerlSetVar APACHE_CARP_HANDLER email'. This way yo

Re: RFC: Apache::Carp - Error Handling under mod_perl

2000-11-30 Thread Matt Sergeant
On Thu, 30 Nov 2000, Gunther Birznieks wrote: > Can you help by explaining what this does that is different from CGI::Carp? > What are you doing that is Apache specific? Could CGI::Carp do the job? If > there was something you needed added to CGI::Carp, would it make sense for > you to add the ap

Re: RFC: Apache::Carp - Error Handling under mod_perl

2000-11-30 Thread Gunther Birznieks
Can you help by explaining what this does that is different from CGI::Carp? What are you doing that is Apache specific? Could CGI::Carp do the job? If there was something you needed added to CGI::Carp, would it make sense for you to add the apache-specific function flag to CGI::Carp instead of

Re: RFC: Apache::Carp - Error Handling under mod_perl

2000-11-29 Thread Dave Rolsky
On Thu, 30 Nov 2000, T.J. Mather wrote: > I've done a lot of programming under mod_perl and I got tired of > examining the error logs for errors. So I wrote a module that displays > to the broswer the error (with a complete call stack) for any fatals or > warnings that occur on a development ser

RFC: Apache::Carp - Error Handling under mod_perl

2000-11-29 Thread T.J. Mather
I've done a lot of programming under mod_perl and I got tired of examining the error logs for errors. So I wrote a module that displays to the broswer the error (with a complete call stack) for any fatals or warnings that occur on a development server (similar to using CGI::Carp qw(fatalsToBrowse

Re: custom error handling logs 200 status?

2000-05-17 Thread Nancy Lin
According to the apache documentation, the custom log directive %s logs the status of the original request. Isn't that 500 in this case? It says 500 when I telnet to the server. I don't quite understand your explanation. Can you give more details? When I have a regular ErrorDocument directi

Re: custom error handling logs 200 status?

2000-05-17 Thread James G Smith
Nancy Lin <[EMAIL PROTECTED]> wrote: > >Hi > >In the mod_perl eagle book, there's a section on writing customer error >handler (pg 173-174). The example has two scripts. The first one >GoFish.pm, basically returns a 500 status code and names Carp.pm as the >custom error handler. > >I notice tha

custom error handling logs 200 status?

2000-05-17 Thread Nancy Lin
Hi In the mod_perl eagle book, there's a section on writing customer error handler (pg 173-174). The example has two scripts. The first one GoFish.pm, basically returns a 500 status code and names Carp.pm as the custom error handler. I notice that if I take out the line: $r-custo

PerlDispatchHandler for error handling?

2000-02-10 Thread David Harris
Hey, Does anybody know how to use PerlDispatchHandler to somehow trap errors in perl? I think I remember somebody mentioning that... I've been looking around and I can't find too much of any documentation about what PerlDispatchHandler actually does. (Already checked the archives and www.modperl.