capturing mysql errors in Perl

2001-04-20 Thread yogi

Hi,
I've got a problem on one of my clients' servers, which is, that the
errors mySQL throws are not captured by the Perl CGI using mySQL, but are
thrown regardless, meaning that a CGI that provokes an error in mySQL
will produce an unspecified "Internal Server Error", which is not very
helpful for debugging purposes. It looks as if mySQL goes straight to the
OS with the error, instead of giving Perl the chance to handle it? And how
can this be avoided?
Thank you in advance, Yogi


- so what? Life's a long journey.
yogi's numbers:
e-mail: [EMAIL PROTECTED]
snail-mail: yogi / Postfach 922143 / 45542 Sprockhvel / Germany
fax/phone: (Berlin)+49(30)690-88394 (Paris)+33(1)53010735
(Seattle)+1(206)3742390
mobile: +49(177)599-6424


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




capturing mysql errors in Perl

2001-04-20 Thread William Goedicke

Dear Yogi - 

yogi writes:

 I've got a problem on one of my clients' servers, which is, that the 
 errors mySQL throws are not captured by the Perl CGI using mySQL, but are 
 thrown regardless, meaning that a CGI that provokes an error in mySQL 
 will produce an unspecified "Internal Server Error", which is not very 
 helpful for debugging purposes. It looks as if mySQL goes straight to the 
 OS with the error, instead of giving Perl the chance to handle it? And how 
 can this be avoided?

Hmmm, maybe I'm not interpreting your message correctly, but it sounds
to me like you're experiencing the standard CGI error handling problem
along with perhaps some signal handling.

CGIs are awkward to debug using standard web browsers because normally
error messages don't have HTTP headers so all you ever get is
"Internal Server Error".  That's what the browser says when you pass
it information that's not properly formatted HTTP.  The best way to
deal with this problem is to use a pretend browser like the command
line or emacs W3 and debug your code that way.

As to the perl signal handling I would go to the "Advanced Perl
Programming" book.  I'd be willing to take a look if you want to share
the offending code.

Yours - Billy

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: capturing mysql errors in Perl

2001-04-20 Thread Peter J. Schoenster

On 20 Apr 2001, at 14:16, yogi wrote:

 errors mySQL throws are not captured by the Perl CGI using mySQL, but
 are thrown regardless, meaning that a CGI that provokes an error in
 mySQL will produce an unspecified "Internal Server Error", which is
 not very helpful for debugging purposes. It looks as if mySQL goes
 straight to the OS with the error, instead of giving Perl the chance
 to handle it? And how can this be avoided? Thank you in advance, Yogi

This should be obvious but I mention it because it works for me.


Search for eval on this page, or just reread the whole page:

http://www.oreilly.com/catalog/perldbi/chapter/ch04.html

I don't think this is mysql specific as following the above 
instructions works for me with mysql.

Peter
All idioms must be learned.
Good idioms only need to be learned once. 
--Alan Cooper

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php