Class CouchbaseLiteException

  • All Implemented Interfaces:
    java.io.Serializable

    public final class CouchbaseLiteException
    extends java.lang.Exception
    A CouchbaseLiteException gets raised whenever a Couchbase Lite faces errors.
    See Also:
    Serialized Form
    • Constructor Detail

      • CouchbaseLiteException

        public CouchbaseLiteException​(@NonNull
                                      java.lang.String message)
        Constructs a new exception with the specified detail message.
        Parameters:
        message - the detail message.
      • CouchbaseLiteException

        @Deprecated
        public CouchbaseLiteException​(@NonNull
                                      java.lang.Exception cause)
        Deprecated.
        Must supply an error message
        Constructs a new exception with the specified cause
        Parameters:
        cause - the cause
      • CouchbaseLiteException

        public CouchbaseLiteException​(@NonNull
                                      java.lang.String message,
                                      @NonNull
                                      java.lang.Exception cause)
        Constructs a new exception with the specified cause
        Parameters:
        cause - the cause
      • CouchbaseLiteException

        @Deprecated
        public CouchbaseLiteException​(@NonNull
                                      CBLInternalException cause)
        Deprecated.
        Must supply an error message
        Constructs a new exception from an internal exception
        Parameters:
        cause - the internal exception
      • CouchbaseLiteException

        public CouchbaseLiteException​(@NonNull
                                      java.lang.String message,
                                      @NonNull
                                      CBLInternalException cause)
        Constructs a new exception from an internal exception
        Parameters:
        cause - the internal exception
      • CouchbaseLiteException

        @Deprecated
        public CouchbaseLiteException​(@NonNull
                                      java.lang.String domain,
                                      int code)
        Deprecated.
        Must supply an error message
        Constructs a new exception with the specified error domain and error code
        Parameters:
        domain - the error domain
        code - the error code
      • CouchbaseLiteException

        public CouchbaseLiteException​(@NonNull
                                      java.lang.String message,
                                      @NonNull
                                      java.lang.String domain,
                                      int code)
        Constructs a new exception with the specified detail message, error domain and error code
        Parameters:
        message - the detail message
        domain - the error domain
        code - the error code
      • CouchbaseLiteException

        @Deprecated
        public CouchbaseLiteException​(@NonNull
                                      java.lang.String domain,
                                      int code,
                                      @NonNull
                                      java.lang.Exception cause)
        Deprecated.
        Must supply an error message
        Constructs a new exception with the specified error domain, error code and the specified cause
        Parameters:
        domain - the error domain
        code - the error code
        cause - the cause
      • CouchbaseLiteException

        @Deprecated
        public CouchbaseLiteException​(@NonNull
                                      java.lang.String domain,
                                      int code,
                                      @Nullable
                                      java.util.Map<java.lang.String,​java.lang.Object> info)
        Deprecated.
        Must supply an error message
        Constructs a new exception with the specified error domain, error code and the specified cause
        Parameters:
        domain - the error domain
        code - the error code
        info - the internal info map
      • CouchbaseLiteException

        public CouchbaseLiteException​(@NonNull
                                      java.lang.String message,
                                      @NonNull
                                      java.lang.Exception cause,
                                      @NonNull
                                      java.lang.String domain,
                                      int code)
        Constructs a new exception with the specified error domain, error code and the specified cause
        Parameters:
        message - the detail message
        cause - the cause
        domain - the error domain
        code - the error code
      • CouchbaseLiteException

        public CouchbaseLiteException()
        This method is not part of the public API. Do not use it. It may change or disappear at any time.
      • CouchbaseLiteException

        public CouchbaseLiteException​(@Nullable
                                      java.lang.String message,
                                      @Nullable
                                      java.lang.Exception cause,
                                      @Nullable
                                      java.lang.String domain,
                                      int code,
                                      @Nullable
                                      java.util.Map<java.lang.String,​java.lang.Object> info)
        This method is not part of the public API. Do not use it. It may change or disappear at any time.
    • Method Detail

      • toCouchbaseLiteException

        @NonNull
        public static CouchbaseLiteException toCouchbaseLiteException​(int domain,
                                                                      int status,
                                                                      int info)
      • toCouchbaseLiteException

        @NonNull
        public static CouchbaseLiteException toCouchbaseLiteException​(int domainCode,
                                                                      int statusCode,
                                                                      @Nullable
                                                                      java.lang.String msg,
                                                                      @Nullable
                                                                      java.lang.Exception e)
      • getDomain

        @NonNull
        public java.lang.String getDomain()
        Access the error domain for this error.
        Returns:
        The numerical domain code for this error.
      • getCode

        public int getCode()
        Access the error code for this error.
        Returns:
        The numerical error code for this error.
      • getInfo

        @Nullable
        public java.util.Map<java.lang.String,​java.lang.Object> getInfo()
      • toString

        @NonNull
        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Throwable