Re: Weird stack trace in error_log from PDOException
| From: | Russ Brown | Date: | Sat, 21 Oct 2006 13:19:07 +0000 |
| Subject: | Re: Weird stack trace in error_log from PDOException | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-243423@lists.php.net to get a copy of this message | ||
Roman Neuhauser wrote:
> # pickscrape@gmail.com / 2006-10-19 16:05:58 -0500:
>> try
>> {
>> $objStatement->execute($arrParams);
>> $intID = $objStatement->fetchColumn();
>> $objStatement->closeCursor();
>> }
>> catch (PDOException $objEx)
>> {
>> error_log(get_class($objEx));
>> // Actually handle the exception
>> }
>>
>> The query runs a stored procedure which sometimes results in an
>> (expected) error condition which the catch block handles. It all works
>> perfectly, with one exception: Inbetween the call to fetchColumn and the
>> catch block being invoked, PHP dumps a stack trace to the error log
>> complaining about the exception, and I can't for the life of me figure
>> out why or how to stop it.
>
> A wild guess: do you have xdebug enabled?
>
BINGO!
Excellent, thanks for that. I'd never even considered xdebug.
I only really have it installed for coverage in phing. I suppose I
really should check out what else xdebug can do as it might be handy.
Thanks again!