Skip to content

Commit cc48fd4

Browse files
committed
docs for new exception types
1 parent b0da641 commit cc48fd4

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

cassandra/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,16 @@ class UserAggregateDescriptor(SignatureDescriptor):
195195

196196

197197
class DriverException(Exception):
198+
"""
199+
Base for all exceptions explicitly raised by the driver.
200+
"""
198201
pass
199202

200203

201204
class RequestExecutionException(DriverException):
205+
"""
206+
Base for request execution exceptions returned from the server.
207+
"""
202208
pass
203209

204210

@@ -395,10 +401,16 @@ def __init__(self, summary_message, keyspace, function, arg_types):
395401

396402

397403
class RequestValidationException(DriverException):
404+
"""
405+
Server request validation failed
406+
"""
398407
pass
399408

400409

401410
class ConfigurationException(RequestValidationException):
411+
"""
412+
Server indicated request errro due to current configuration
413+
"""
402414
pass
403415

404416

docs/api/cassandra.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222
:members:
2323
:inherited-members:
2424

25+
.. autoexception:: DriverException()
26+
:members:
27+
28+
.. autoexception:: RequestExecutionException()
29+
:members:
30+
2531
.. autoexception:: Unavailable()
2632
:members:
2733

@@ -34,6 +40,9 @@
3440
.. autoexception:: WriteTimeout()
3541
:members:
3642

43+
.. autoexception:: CoordinationFailure()
44+
:members:
45+
3746
.. autoexception:: ReadFailure()
3847
:members:
3948

@@ -43,6 +52,12 @@
4352
.. autoexception:: FunctionFailure()
4453
:members:
4554

55+
.. autoexception:: RequestValidationException()
56+
:members:
57+
58+
.. autoexception:: ConfigurationException()
59+
:members:
60+
4661
.. autoexception:: AlreadyExists()
4762
:members:
4863

0 commit comments

Comments
 (0)