| List: | MySQL++ | « Previous MessageNext Message » | |
| From: | Jim Wallace | Date: | January 28 2009 1:02pm |
| Subject: | RE: Question about BadQuery | ||
| View as plain text | |||
I do that exact same thing elsewhere and was thinking the about doing it in for the query to avoid getting my MySQL++ code out-of-sync. However, it does require the extra str() and quite a bit of code changes to do that. I'm going to look at when BadQuery is thrown and if it's easy to put in the completed query I'll do that. Thanks. -----Original Message----- From: Warren Young [mailto:mysqlpp@stripped] Sent: Tuesday, January 27, 2009 11:45 PM To: Jim Wallace Subject: Re: Question about BadQuery Jim Wallace wrote: > if I have multiple statements in a try/catch I could figure out > which one caused the exception. A way you could get by without it: string last_query; try { Query q("stuff"); last_query = q.str(); StoreQueryResult res = q.store(); // do something with res q = "other stuff"; last_query = q.str(); res = q.store(); // do more stuff ... } catch (const BadQuery& e) { cerr << "Query failed: \"" << last_query << "\"" << endl; }
| Thread | ||
|---|---|---|
| • RELEASE: v3.0.5 | Warren Young | 7 Aug |
| • query.str() in template query -- help! | Jim Wallace | 28 Jan |
| • RE: query.str() in template query -- <blush> | Jim Wallace | 28 Jan |
| • Re: query.str() in template query -- <blush> | Warren Young | 28 Jan |
| • storein with parameters | Jim Wallace | 28 Jan |
| • Re: storein with parameters | Warren Young | 28 Jan |
| • RE: storein with parameters | Jim Wallace | 28 Jan |
| • Re: storein with parameters | Warren Young | 28 Jan |
| • Question about BadQuery | Jim Wallace | 28 Jan |
| • Re: Question about BadQuery | Warren Young | 28 Jan |
| • RE: RELEASE: v3.0.5 | Bernard | 8 Aug |
| • Re: RELEASE: v3.0.5 | Warren Young | 8 Aug |
| • Re: RELEASE: v3.0.5 | Alex | 9 Aug |
| • RE: Question about BadQuery | Jim Wallace | 28 Jan |
| • RE: Question about BadQuery | Dale Stewart | 28 Jan |
| • RE: Question about BadQuery | Dale Stewart | 28 Jan |
| • Re: Question about BadQuery | Warren Young | 28 Jan |
