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
`static class` `ErrorMessage.WrappedException`

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

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

### Field Summary

Fields
`static Message.Codec<ErrorMessage>` `codec`
`TransportException` `error`

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

`tracingId, warnings`

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

`connection, forcedProtocolVersion, type`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`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, getWarnings, setTracingId, setWarnings`

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

`attach, connection, getCustomPayload, getSourceFrame, getStreamId, setCustomPayload, 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)