You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2011/04/23 02:18:48 UTC

svn commit: r1096095 - /cassandra/branches/cassandra-0.8/drivers/py/cql/cursor.py

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")