-Original Message-
From: Jay Strauss [mailto:[EMAIL PROTECTED]]
I've tried the suggestions so far:
cgi::carp
http://perl.apache.org/guide/snippets.html#Redirecting_Errors_to_t
he_Client
BEGIN { print "Content-Type: text/plain\n\n"; *STDERR = *STDOUT }
Jay,
Below is a module I
On Tue, 22 Aug 2000, Howard Jones wrote:
Something that may be worthwhile as a starting point for you is CGI::Debug
There is an Apache::Debug in the standard distribution. If you turn on
the debugging flag in Apache::Registry, it looks like it will send the
errors to the client using this
]]
Sent: 21 August 2000 16:44
To: [EMAIL PROTECTED]
Subject: Re: Producing an error page
Sorry,
I didn't explain my question well. But thanks for all the response.
I left "my" out of my example on purpose, to illustrate a typical
(in my case)
programming error.
To restate what
http://perl.apache.org/guide/snippets.html#Redirecting_Errors_to_the_Client
HTH
--Geoff
-Original Message-
From: Jay Strauss [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 21, 2000 9:56 AM
To: [EMAIL PROTECTED]
Subject: Producing an error page
Hi,
I'm asking this again,
Have a look at CGI::Carp.
Jay Strauss wrote:
Hi,
I'm asking this again, due to lack of response (but I can't believe no one out
there knows how to do this).
How do I produce an error page (in HTML), when I call the script from a browser,
that looks just like the error screen I get
On Mon, 21 Aug 2000, Jay Strauss wrote:
---
#!/usr/bin/perl -w
use strict;
use diagnostics;
Try adding:
use CGI::Carp; # send error messages to browser
($first, $second) = @ARGV;
Try:
my ($first, $second) = @ARGV;
You may also want to check "my" in a Perl book, just so you know
Jay, although others have recommended you look at the mod_perl guide and
CGI::Carp, I don't think these are exactly what you're looking for. The
errors you are getting are generated because of 'use strict;' and occur at
compile time; CGI::Carp is capable of redirecting errors to the browser (if
Sorry,
I didn't explain my question well. But thanks for all the response.
I left "my" out of my example on purpose, to illustrate a typical (in my case)
programming error.
To restate what I'm asking:
Is there any way to redirect everything that would normally be sent to the
screen, when I
The stuff that the server sends back comes from STDOUT if CGIs or within
mod-perl, either $req-print or a regular print since it is tied. The
error messages go to STDERR which apache redirects internalls so that the
messages go to the error log. I don't know that it's possible and I'm
At first, when I read the first message, I said to myself; (self) Why would
anyone want an error page with all the Perl HTML STDOUT/STDOUT stuff mixed
up together? However, after reading and thinking some more, . . . (just
from a conceptional point of view and not from an implementation view
i may be coming in late here, so forgive me if this has been mentioned:
use CGI::Carp qw(fatalsToBrowser);
not sure if everything you want will be sent to the browser, but it is better
than a standard 500 error, and you can read the errors from the log easier.
--
___cliff [EMAIL
11 matches
Mail list logo