Exceptions

AnonymousRecordUninitialized

An exception that is thrown if a AnonymousRecord.discard() or AnonymousRecord.delete() is attempted before a record has been set via AnonymousRecord.setName(name)

DeepstreamError

DeepstreamErrors are used for expected or handleable error cases, e.g. RecordHandler.snapshot(recordName) being called for a non-existant record.

DeepstreamException

Deepstream runtime exception, e.g. response timeouts. These can be centrally caught using the DeepstreamClient.setRuntimeErrorHandler(handler).

Fields

Name Description
topic The Topic the event occured on
event The exception event
message The exception message, explaning the issue in english for logging purposes

DeepstreamRecordDestroyedException

Called whenever an action on a discarded or deleted record is attempted. Retrieve a new instance of the Record using RecordHandler.getRecord(recordName) to continue using it.

InvalidDeepstreamConfig

Thrown if any of the options passed to DeepstreamClient(options) are invalid, due to type or invalid enum.

RecordMergeStategyException

Thrown when a version conflict occurs, and is only exposed to the client via RecordEventsListener.onError(recordName, errorType, errorMessage)

Properties

Name Type Description
newData JsonElement The new data attempted to be set from the server
remoteVersion int The version of the record on the server
oldData JsonElement The old data currently on the client
version int The version of the record on the client
error String The error message associated with merge conflict returned by a custom RecordMergeStrategy

Constructors

RecordMergeStrategyException()

Use when you don’t need any merge conflict data

RecordMergeStrategyException(int localVersion, JsonElement oldData, int remoteVersion, JsonElement remoteData, String error)

{{#table mode="java-api"}}
-
  arg: localVersion
  typ: int
  des: The local version during the merge
-
  arg: oldData
  typ: JsonElement
  des: The local data during the merge
-
  arg: remoteVersion
  typ: int
  des: The remote version during the merge
-
  arg: remoteData
  typ: JsonElement
  des: The remote data during the merge
-
  arg: error
  typ: String
  des: An associated error message
{{/table}}

An exception that can contain all the merge issues