Package com.couchbase.lite
Class CouchbaseLiteException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.couchbase.lite.CouchbaseLiteException
-
- All Implemented Interfaces:
Serializable
public final class CouchbaseLiteException extends Exception
A 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(CBLInternalException cause)Deprecated.Must supply an error messageCouchbaseLiteException(Exception cause)Deprecated.Must supply an error messageCouchbaseLiteException(String message)Constructs a new exception with the specified detail message.CouchbaseLiteException(String domain, int code)Deprecated.Must supply an error messageCouchbaseLiteException(String domain, int code, Exception cause)Deprecated.Must supply an error messageCouchbaseLiteException(String domain, int code, Map<String,Object> info)Deprecated.Must supply an error messageCouchbaseLiteException(String message, CBLInternalException cause)Constructs a new exception from an internal exceptionCouchbaseLiteException(String message, Exception cause)Constructs a new exception with the specified causeCouchbaseLiteException(String message, Exception cause, String domain, int code)Constructs a new exception with the specified error domain, error code and the specified causeCouchbaseLiteException(String message, Exception cause, String domain, int code, Map<String,Object> info)This method is not part of the public API.CouchbaseLiteException(String message, 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(C4Error c4err)static CouchbaseLiteExceptionconvertException(LiteCoreException e)static CouchbaseLiteExceptionconvertException(LiteCoreException e, String msg)intgetCode()Access the error code for this error.StringgetDomain()Access the error domain for this error.Map<String,Object>getInfo()static CouchbaseLiteExceptiontoCouchbaseLiteException(int domain, int status, int info)static CouchbaseLiteExceptiontoCouchbaseLiteException(int domainCode, int statusCode, String msg, Exception e)StringtoString()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
CouchbaseLiteException
public CouchbaseLiteException(@NonNull String message)Constructs a new exception with the specified detail message.- Parameters:
message- the detail message.
-
CouchbaseLiteException
@Deprecated public CouchbaseLiteException(@NonNull Exception cause)
Deprecated.Must supply an error messageConstructs a new exception with the specified cause- Parameters:
cause- the cause
-
CouchbaseLiteException
public CouchbaseLiteException(@NonNull String message, @NonNull 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 messageConstructs a new exception from an internal exception- Parameters:
cause- the internal exception
-
CouchbaseLiteException
public CouchbaseLiteException(@NonNull String message, @NonNull CBLInternalException cause)Constructs a new exception from an internal exception- Parameters:
cause- the internal exception
-
CouchbaseLiteException
@Deprecated public CouchbaseLiteException(@NonNull 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 String message, @NonNull 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 String domain, int code, @NonNull 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 String domain, int code, @Nullable Map<String,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 String message, @NonNull Exception cause, @NonNull 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.
-
-
Method Detail
-
convertC4Error
@NonNull public static CouchbaseLiteException convertC4Error(@Nullable C4Error c4err)
-
convertException
@NonNull public static CouchbaseLiteException convertException(@Nullable LiteCoreException e)
-
convertException
@NonNull public static CouchbaseLiteException convertException(@Nullable LiteCoreException e, @NonNull 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 String msg, @Nullable Exception e)
-
getDomain
@NonNull public 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.
-
-