Phoenix.pm: Trying to capture an error
jimm at amug.org
Sat Sep 9 19:32:08 CDT 2000
You might want to look at the camel book's description of using eval. I'm not
sure if it'll help you find the problem, but once you know where the problem is
coming from it'll help you trap it. Have you tried stepping through with the
perl debbuger? That might get you close enough to where eval could trap the
On 9/9/00 at 4:31 AM, webmaster at azwebs.com (Webmaster) wrote:
> Hey guys,
> I occasionally have an error in my ICM program, but I am unable to track it.
> Its an odd one, and I'm perplexed. What I'm looking for though, is some
> ideas on how to debug this... I'll resort to brute force eventually, but I
> would like to save some time by trying to catch the beast in the act.
> 1. The bug is intermittant. It happens only about 10-20 percent of the time
> when use a certain package. I simply get the dreaded "Premature End of
> Script Headers".
> 2. I have been able to capture other fatal errors and print them out
> (undefined sub, etc), but my error catching routines don't seem to help
> here. Might that be because the filehandles are not being dumped? (what
> happens on a die?) (do all 'dies' behave the same?)
> 3. I've tried to get around the "Premature End..." by printing
> "Content-type:text/html\n\n" as the FIRST line in the BEGIN block, but that
> is not making a difference
> 4. The intermittancy has me thinking that it is either a DB connection issue
> or that a package I'm requiring is in use by some other Perl script. Can
> that kind of thing happen?
> 5 Are there any %SIG tricks that I might be able to use. (I already use DIE
> and QUIT as error catchers)
> Well, I realize this is ambiguous, so I'm sorry for that. I'm not really
> frustrated by the error (well, OK, I am...), but I'm more frustrated and
> confused that I can't 'catch it in the act'.
> Can anyone help me out?
More information about the Phoenix-pm