Package com.couchbase.lite
Class CouchbaseLiteException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.couchbase.lite.CouchbaseLiteException
-
- All Implemented Interfaces:
java.io.Serializable
public final class CouchbaseLiteException extends java.lang.ExceptionA CouchbaseLiteException gets raised whenever a Couchbase Lite faces errors.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CouchbaseLiteException()This method is not part of the public API.CouchbaseLiteException(com.couchbase.lite.internal.CBLInternalException cause)Deprecated.Must supply an error messageCouchbaseLiteException(java.lang.Exception cause)Deprecated.Must supply an error messageCouchbaseLiteException(java.lang.String message)Constructs a new exception with the specified detail message.CouchbaseLiteException(java.lang.String domain, int code)Deprecated.Must supply an error messageCouchbaseLiteException(java.lang.String domain, int code, java.lang.Exception cause)Deprecated.Must supply an error messageCouchbaseLiteException(java.lang.String domain, int code, java.util.Map<java.lang.String,java.lang.Object> info)Deprecated.Must supply an error messageCouchbaseLiteException(java.lang.String message, com.couchbase.lite.internal.CBLInternalException cause)Constructs a new exception from an internal exceptionCouchbaseLiteException(java.lang.String message, java.lang.Exception cause)Constructs a new exception with the specified causeCouchbaseLiteException(java.lang.String message, java.lang.Exception cause, java.lang.String domain, int code)Constructs a new exception with the specified error domain, error code and the specified causeCouchbaseLiteException(java.lang.String message, java.lang.Exception cause, java.lang.String domain, int code, java.util.Map<java.lang.String,java.lang.Object> info)This method is not part of the public API.CouchbaseLiteException(java.lang.String message, java.lang.String domain, int code)Constructs a new exception with the specified detail message, error domain and error code
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CouchbaseLiteExceptionconvertC4Error(com.couchbase.lite.internal.core.C4Error c4err)static CouchbaseLiteExceptionconvertException(LiteCoreException e)static CouchbaseLiteExceptionconvertException(LiteCoreException e, java.lang.String msg)intgetCode()Access the error code for this error.java.lang.StringgetDomain()Access the error domain for this error.java.util.Map<java.lang.String,java.lang.Object>getInfo()static CouchbaseLiteExceptiontoCouchbaseLiteException(int domain, int status, int info)static CouchbaseLiteExceptiontoCouchbaseLiteException(int domainCode, int statusCode, java.lang.String msg, java.lang.Exception e)java.lang.StringtoString()
-
-
-
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 messageConstructs 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 com.couchbase.lite.internal.CBLInternalException cause)Deprecated.Must supply an error messageConstructs a new exception from an internal exception- Parameters:
cause- the internal exception
-
CouchbaseLiteException
public CouchbaseLiteException(@NonNull java.lang.String message, @NonNull com.couchbase.lite.internal.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 messageConstructs a new exception with the specified error domain and error code- Parameters:
domain- the error domaincode- 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 messagedomain- the error domaincode- the error code
-
CouchbaseLiteException
@Deprecated public CouchbaseLiteException(@NonNull java.lang.String domain, int code, @NonNull java.lang.Exception cause)Deprecated.Must supply an error messageConstructs a new exception with the specified error domain, error code and the specified cause- Parameters:
domain- the error domaincode- the error codecause- 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 messageConstructs a new exception with the specified error domain, error code and the specified cause- Parameters:
domain- the error domaincode- the error codeinfo- 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 messagecause- the causedomain- the error domaincode- 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
-
convertC4Error
@NonNull public static CouchbaseLiteException convertC4Error(@Nullable com.couchbase.lite.internal.core.C4Error c4err)
-
convertException
@NonNull public static CouchbaseLiteException convertException(@Nullable LiteCoreException e)
-
convertException
@NonNull public static CouchbaseLiteException convertException(@Nullable LiteCoreException e, @NonNull java.lang.String msg)
-
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:
toStringin classjava.lang.Throwable
-
-