From: Warren Young Date: June 8 2009 7:47pm Subject: Re: Detecting errors executing SQL queries List-Archive: http://lists.mysql.com/plusplus/8602 Message-Id: MIME-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Jun 8, 2009, at 6:18 AM, Martin Dubuc wrote: > I don't really understand the change you describe to the simple1.cpp > example. > http://en.wikipedia.org/wiki/Patch_(Unix)#Usage_examples > In your modified example, if > the query was bad and exceptions were disabled, then, the code would > never > get to the "else" section, meaning that it is not possible to detect > errors > in handling the query. On following the instructions in the Wikipedia article to apply the patch, you will see that it causes simple1 to detect the broken query correctly. (Notice that the patch also changed the query string.) A single-character change to the patch to un-break the query ("stocxk" - > "stock") will then cause simple1 to take the other branch in the if/ else. Therefore, this feature of MySQL++ is not broken. If you still don't believe me after trying it, modify another one of the examples to demonstrate the problem, then post the patch. It's far more credible than posting code snippets that don't compile.