io.realm.mongodb
Esta clase encapsula todos los errores que ocurren al comunicarse con una aplicación MongoDB Realm. Esto incluye tanto excepciones como errores de protocolo. Solo se garantiza que getErrorCode() contenga un valor. Si el error fue causado por una excepción subyacente,getErrorMessage() es... null y getException() está configurado, mientras que si el error fue un error de protocolo,getErrorMessage() está configurado y getException() es nulo.
Constructores
Constructor and Description |
|---|
Create an error caused by an error in the protocol when communicating with the Object Server. |
Crea un error desconocido que no se asignó a ningún caso de error conocido. |
Create an error caused by an an exception when communicating with the Object Server. |
Errors happening while trying to authenticate a user. |
Generic error happening that could happen anywhere. |
Resumen del método
Modificador y Tipo | Método y descripción |
|---|---|
getCategory () Returns the ErrorCode.Category category for this error. | |
Código de errorpúblico | getErrorCode () Devuelve el ErrorCode que identifica el tipo de error. |
public int | Devuelve un número entero que representa este tipo específico de error. |
public String | Devuelve un mensaje de error más detallado sobre la causa de este error. |
public String | getErrorType () Devuelve una string que describe el tipo de error que es. |
public Throwable | getException () Devuelve la excepción subyacente que causa este error, si existe. |
public String | toString () |
Inherited Methods
Methods inherited from class java.lang.Object :
getClass,hashCode,equals,clone,toString,notify,notifyAll,wait,wait,wait,finalizeMethods inherited from class java.lang.Throwable :
getMessage,getLocalizedMessage,getCause,initCause,toString,printStackTrace,printStackTrace,printStackTrace,fillInStackTrace,getStackTrace,setStackTrace,addSuppressed,getSuppressed
Detalle del constructor
Create an error caused by an error in the protocol when communicating with the Object Server. Parámetros
|
Creates an unknown error that could not be mapped to any known error case.This means that getErrorCode() will return ErrorCode.UNKNOWN , but getErrorType() and getErrorIntValue() will return the underlying values which can help identify the real error. Parámetros
|
Create an error caused by an an exception when communicating with the Object Server. Parámetros
|
Errors happening while trying to authenticate a user. Parámetros
|
Generic error happening that could happen anywhere. Parámetros
|
public AppException ( ErrorCode errorCode, String nativeErrorType, int nativeErrorCode, String errorMessage, Throwable exception ) |
|---|
Detalle del método
getCategory
public ErrorCode.Category getCategory () |
|---|
Returns the ErrorCode.Category category for this error. Errors that are ErrorCode.Category.RECOVERABLE mean that it is still possible for a given SyncSession to resume synchronization. ErrorCode.Category.FATAL errors means that session has stopped and cannot be recovered. Devuelve la categoría del error. |
getErrorCode
public ErrorCode getErrorCode () |
|---|
Devuelve el ErrorCode que identifica el tipo de error. If ErrorCode.UNKNOWN is returned, it means that the error could not be mapped to any known errors. In that case getErrorType() and getErrorIntValue() will return the underlying error information which can better identify the type of error. Devuelve the error code identifying the type of error. Tip |
getErrorIntValue
public int getErrorIntValue () |
|---|
Returns an integer representing this specific type of error. This value is only unique within the value provided by getErrorType() . Devuelve the integer value representing this type of error. |
getErrorMessage
public String getErrorMessage () |
|---|
Devuelve un mensaje de error más detallado sobre la causa de este error. Devuelve a detailed error message or |
getErrorType
public String getErrorType () |
|---|
Devuelve una string que describe el tipo de error que es. Devuelve |
getException
public Throwable getException () |
|---|
Devuelve la excepción subyacente que causa este error, si existe. Devuelve the underlying exception causing this error, or |