ErrorMessage (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.transport.messages

## Class ErrorMessage

- java.lang.Object
- - org.apache.cassandra.transport.Message
  - - org.apache.cassandra.transport.Message.Response
    - - org.apache.cassandra.transport.messages.ErrorMessage

-     public class ErrorMessage
      extends Message.Response

  Message to indicate an error to the client.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.cassandra.transport.Message

      `Message.Codec<M extends Message>, Message.Direction, Message.Dispatcher, Message.ProtocolDecoder, Message.ProtocolEncoder, Message.Request, Message.Response, Message.Type`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Message.Codec<ErrorMessage>` | `codec`
    `TransportException` | `error`

    - ### Fields inherited from class org.apache.cassandra.transport.Message.Response

      `tracingId`

    - ### Fields inherited from class org.apache.cassandra.transport.Message

      `connection, type`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ErrorMessage` | `fromException(java.lang.Throwable e)`
    `static ErrorMessage` | `fromException(java.lang.Throwable e, com.google.common.base.Predicate<java.lang.Throwable> unexpectedExceptionHandler)`
    `java.lang.String` | `toString()`
    `static java.lang.RuntimeException` | `wrap(java.lang.Throwable t, int streamId)`

    - ### Methods inherited from class org.apache.cassandra.transport.Message.Response

      `getTracingId, setTracingId`

    - ### Methods inherited from class org.apache.cassandra.transport.Message

      `attach, connection, getSourceFrame, getStreamId, setSourceFrame, setStreamId`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### codec

          public static final Message.Codec<ErrorMessage> codec

    - #### error

          public final TransportException error

  - ### Method Detail

    - #### fromException

          public static ErrorMessage fromException(java.lang.Throwable e)

    - #### fromException

          public static ErrorMessage fromException(java.lang.Throwable e,
                                   com.google.common.base.Predicate<java.lang.Throwable> unexpectedExceptionHandler)

      Parameters:
        `e` - the exception
        `unexpectedExceptionHandler` - a callback for handling unexpected exceptions. If null, or if this returns false, the error is logged at ERROR level via sl4fj

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### wrap

          public static java.lang.RuntimeException wrap(java.lang.Throwable t,
                                        int streamId)

Copyright © 2014 The Apache Software Foundation