List:MySQL++« Previous MessageNext Message »
From:Wojciech Barski Date:August 22 2011 11:07pm
Subject:query.use() and disabled exceptions
View as plain text  
Hi, all,

I've noticed a weird thing when using Query::use() method. When you execute
a query that returns an error and exceptions are disabled, an empty
UseQueryResult object is returned (as in "return UseQueryResult();").
However, the default constructor for UseQueryResult causes the object to
always have exceptions turned on. So subsequent calls to fetch_row() trigger
exceptions instead of returning an empty Row object, even though the
connection object was created with exception turned off.

I don't know, if it's a mistake or it's on purpose, however my feeling is
that the empty UseQueryResult object should keep the exception state of the
connection it derived from.

Please correct me, if I'm wrong on this one (using MySQL++ 3.1.0).

Kind regards

Wojtek

Thread
query.use() and disabled exceptionsWojciech Barski23 Aug
  • Re: query.use() and disabled exceptionsWarren Young23 Aug
    • Re: query.use() and disabled exceptionsWojciech Barski23 Aug