cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1096095 - /cassandra/branches/cassandra-0.8/drivers/py/cql/cursor.py
Date Sat, 23 Apr 2011 00:18:48 GMT
Author: jbellis
Date: Sat Apr 23 00:18:47 2011
New Revision: 1096095

URL: http://svn.apache.org/viewvc?rev=1096095&view=rev
Log:
more user-friendly messages for UE/TOE in cqlsh
patch by eevans and jbellis for CASSANDRA-2539

Modified:
    cassandra/branches/cassandra-0.8/drivers/py/cql/cursor.py

Modified: cassandra/branches/cassandra-0.8/drivers/py/cql/cursor.py
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/drivers/py/cql/cursor.py?rev=1096095&r1=1096094&r2=1096095&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/drivers/py/cql/cursor.py (original)
+++ cassandra/branches/cassandra-0.8/drivers/py/cql/cursor.py Sat Apr 23 00:18:47 2011
@@ -26,6 +26,8 @@ from cql.cassandra.ttypes import (
     Compression, 
     CqlResultType, 
     InvalidRequestException,
+    UnavailableException,
+    TimedOutException,
     TApplicationException,
     SchemaDisagreementException)
 
@@ -131,6 +133,11 @@ class Cursor:
             raise cql.ProgrammingError("Bad Request: %s" % ire.why)
         except SchemaDisagreementException, sde:
             raise cql.IntegrityError("Schema versions disagree, (try again later).")
+        except UnavailableException:
+            raise cql.OperationalError("Unable to complete request: one or "
+                                       "more nodes were unavailable.")
+        except TimedOutException::
+            raise cql.OperationalError("Request did not complete within rpc_timeout.")
         except TApplicationException, tapp:
             raise cql.InternalError("Internal application error")
 



Mime
View raw message