Xandra v0.13.0 Xandra.ConnectionError exception View Source
An exception struct that represents an error in the connection to the Cassandra server.
For more information on when this error is returned or raised, see the
documentation for the Xandra
module.
The :action
field represents the action that was being performed when the
connection error occurred. The :reason
field represents the reason of the
connection error: for network errors, this is usually a POSIX reason (like
:econnrefused
). The following Xandra-specific reasons are supported:
{:unsupported_compression, algorithm}
- this happens when a:compressor
module has been specified inXandra.start_link/1
, but negotiating the connection algorithm fails because such compressor module uses an algorithm that the Cassandra server does not support.{:cluster, :not_connected}
- this happens when aXandra.Cluster
-based connection is not connected to any node (for example, because all the specified nodes are currently down). See the documentation forXandra.Cluster
for more information.
Since this struct is an exception, it is possible to raise it with
Kernel.raise/1
. If the intent is to format connection errors as strings (for
example, for logging purposes), it is possible to use Exception.message/1
to
get a formatted version of the error.
Link to this section Summary
Functions
Callback implementation for Exception.message/1
.
Link to this section Types
Link to this section Functions
message(connection_error) View Source
Callback implementation for Exception.message/1
.