List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:June 27 2008 4:05am
Subject:Re: Query::storein does not throw exception correctly
View as plain text  
Daniel Rivin wrote:
> 
> there are any misspellings in the SQL statement (table name, SQL
> keywords, etc.) used for the query, an unhandled exception is thrown in
> mysql++.  I've traced it to the UseQueryResult::fetch_raw_row() function
> in result.cpp, where driver_ looks to be NULL.  I'm using source version
> 3.0.3.

I think you've misdiagnosed the problem.

If driver_ is 0, it means you didn't connect to the database successfully.

Coming at it from the other side, I modified examples/ssqls1.cpp, 
dropping an 'x' in at the end of the query string, and got this message:

	Query error: Table 'mysql_cpp_data.stockx' doesn't exist

That indicates that the query error is being detected correctly and 
throwing the right exception.

Try to modify one of the examples to show your symptom, or boil your 
code down to something very short that shows the symptom using the 
sample database.
Thread
Query::storein does not throw exception correctlyDaniel Rivin27 Jun
  • Re: Query::storein does not throw exception correctlyWarren Young27 Jun
    • RE: Query::storein does not throw exception correctlyDaniel Rivin27 Jun
      • Re: Query::storein does not throw exception correctlyWarren Young30 Jun