List:MySQL++« Previous MessageNext Message »
From:Andrej van der Zee Date:January 29 2009 3:00am
Subject:Get failing query in global catch-block for BadQuery
View as plain text  
Hi,

I was wondering if there is any convenient way to
retrieve the last failing query. I am using one outer
try-catch block that deals with all failing queries
that are executed in deeply nested functions. Therefor
it is difficult to find what query exactly failed. For
example, I get a meassge for a duplicate key like: 

"Duplicate entry '106-myjob2' for key 2"

If I have the luxury, I can look it up in the
mysql-logs, but when the error is reported by somebody
else, it is difficult to find the responsible query.

Is it possible to get the failing query in  a
convenient way? I know I can get the query from the
Query object, but in the global catch the query object
is already destroyed. 

Thank you,
Andrej



      
Thread
Get failing query in global catch-block for BadQueryAndrej van der Zee29 Jan
  • Re: Get failing query in global catch-block for BadQueryWarren Young29 Jan
    • Re: Get failing query in global catch-block for BadQueryAndrej van der Zee29 Jan
      • Re: Get failing query in global catch-block for BadQueryWarren Young29 Jan