Class DittoException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DittoException.ActivationException, DittoException.AuthenticationException, DittoException.FatalException, DittoException.IoException, DittoException.PresenceException, DittoException.StoreException, DittoException.TransportException, DittoException.UnknownException, DittoException.UnsupportedException, DittoException.ValidationException

All errors that are thrown by the Ditto SDK are wrapped as a DittoException. This type wraps multiple different types of error that each have an associated reason. You can access more specific information about an error by switching over the error's reason value. A human-readable version of the error is available via the localizedMessage property of the error's reason.
See Also:
  • Field Details

    • internalReason

      protected com.ditto.internal.error.InternalDittoErrorReason internalReason
  • Constructor Details

    • DittoException

      protected DittoException(com.ditto.internal.error.InternalDittoErrorReason internalReason)
  • Method Details

    • getMessage

      public String getMessage()
      A formatted description of the error. Not all errors have a message. Use the null-safe getLocalizedMessage() if you don't want to have to handle null values.
      Overrides:
      getMessage in class Throwable
    • getLocalizedMessage

      public String getLocalizedMessage()
      A String representation of the error suitable for display.
      Overrides:
      getLocalizedMessage in class Throwable