Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Patch for better exception use -- BadQuery w/Errnum patch part 1

From: Jim Wallace <jwallace(at)kaneva.com>
Date: Wed Oct 24 2007 - 14:40:17 EDT


Part 1 of broken up new version of BadQuery update patches after review by Warren.

In this case the BadQuery was being misused in this case and Warren suggested a new exception.

See http://lists.mysql.com/plusplus/7060 for reference

Diffs are from the current svn

Index: result.h


  • result.h (revision 1779) +++ result.h (working copy) @@ -105,7 +105,7 @@ { if (!result_) { if (throw_exceptions()) { - throw BadQuery("Results not fetched"); + throw UseQueryError("Results not fetched"); } else { return Row();

Index: exceptions.h


  • exceptions.h (revision 1779) +++ exceptions.h (working copy) @@ -235,6 +235,19 @@ };
+/// \brief Exception thrown no result set was returned in a fetch, 
+/// usually due to an error.
+
+class MYSQLPP_EXPORT UseQueryError : public Exception
+{
+public:
+	/// \brief Create exception object
+	explicit UseQueryError(const char* w = "") :
+	Exception(w)
+	{
+	}
+};
+
-- 
MySQL++ Mailing List
For list archives: 
http://lists.mysql.com/plusplus
To unsubscribe:    
http://lists.mysql.com/plusplus?unsub=lists@pantek.com
Received on Wed Oct 24 14:40:23 2007

This archive was generated by hypermail 2.1.8 : Fri Jul 04 2008 - 00:21:39 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library