Update of /cvsroot/monetdb/clients/src/python/Cimpl
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25705/python/Cimpl

Modified Files:
      Tag: Clients_1-20
        CMapi.py 
Log Message:
made query errors available at the upper layers
fixes second part of bug
[ 1814768 ] Python Client problems
(tested by sql/src/test/mapi/Tests/python_dbapi)


Index: CMapi.py
===================================================================
RCS file: /cvsroot/monetdb/clients/src/python/Cimpl/CMapi.py,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -u -d -r1.4.2.1 -r1.4.2.2
--- CMapi.py    21 Oct 2007 16:38:59 -0000      1.4.2.1
+++ CMapi.py    21 Oct 2007 20:18:47 -0000      1.4.2.2
@@ -125,7 +125,7 @@
             raise RuntimeError(self.error_str())
         hdl = MapiQuery(hdl, self)
         if self.error():
-            raise RuntimeError(self.error_str())
+            raise RuntimeError(hdl.result_error())
         return hdl
 
     def query_array(self, cmd, argv):
@@ -288,7 +288,7 @@
             raise RuntimeError(self.__mid.error_str())
         if ret == MapiLib.MTIMEOUT:
             raise IOError(self.__mid.error_str())
-    explain = explain_query
+        explain = explain_query
 
     def explain_result(self, f):
         ret = MapiLib.mapi_explain_result(self.__hdl, f)
@@ -299,6 +299,8 @@
 
     def result_error(self):
         ret = MapiLib.mapi_result_error(self.__hdl)
+        if ret:
+            return ret
         if self.__mid.error():
             raise IOError(self.__mid.error_str())
         return ret


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to