Join us at MongoDB.local London on 7 May to unlock new possibilities for your data. Use WEB50 to save 50%.
Register now >
Docs Menu
Docs Home
/ /
io.realm.mongodb

Excepción AppException

java.lang.Object

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.

Tip

Constructor and Description
ErrorCode errorCode,
String errorMessage
)

Create an error caused by an error in the protocol when communicating with the Object Server.

String errorType,
int errorCode,
String errorMessage
)

Crea un error desconocido que no se asignó a ningún caso de error conocido.

ErrorCode errorCode,
Throwable exception
)

Create an error caused by an an exception when communicating with the Object Server.

ErrorCode errorCode,
String title,
String hint
)

Errors happening while trying to authenticate a user.

ErrorCode errorCode,
String errorMessage,
Throwable exception
)

Generic error happening that could happen anywhere.

ErrorCode errorCode,
String nativeErrorType,
int nativeErrorCode,
String errorMessage,
Throwable exception
)
Modificador y Tipo
Método y descripción

Returns the ErrorCode.Category category for this error.

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

Devuelve una string que describe el tipo de error que es.

public Throwable

Devuelve la excepción subyacente que causa este error, si existe.

public String

  • Methods inherited from class java.lang.Object : getClass , hashCode , equals , clone , toString , notify , notifyAll , wait , wait , wait , finalize

  • Methods inherited from class java.lang.Throwable : getMessage , getLocalizedMessage , getCause , initCause , toString , printStackTrace , printStackTrace , printStackTrace , fillInStackTrace , getStackTrace , setStackTrace , addSuppressed , getSuppressed

public AppException (
ErrorCode errorCode,
String errorMessage
)

Create an error caused by an error in the protocol when communicating with the Object Server.

Parámetros

  • errorCode - error code for this type of error.

  • errorMessage - detailed error message.

public AppException (
String errorType,
int errorCode,
String errorMessage
)

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

  • errorCode - error code for this type of error.

  • errorMessage - detailed error message.

public AppException (
ErrorCode errorCode,
Throwable exception
)

Create an error caused by an an exception when communicating with the Object Server.

Parámetros

  • errorCode - error code for this type of error.

  • exception - excepción subyacente que causa este error.

public AppException (
ErrorCode errorCode,
String title,
String hint
)

Errors happening while trying to authenticate a user.

Parámetros

  • errorCode - error code for this type of error.

  • title - título para este tipo de error.

  • hint - una sugerencia para resolver el error.

public AppException (
ErrorCode errorCode,
String errorMessage,
Throwable exception
)

Generic error happening that could happen anywhere.

Parámetros

  • errorCode - error code for this type of error.

  • errorMessage - detailed error message.

  • exception - underlying exception if the error was caused by this.

public AppException (
ErrorCode errorCode,
String nativeErrorType,
int nativeErrorCode,
String errorMessage,
Throwable exception
)

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.

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.

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.

Devuelve un mensaje de error más detallado sobre la causa de este error.

Devuelve

a detailed error message or null if one was not available.

Devuelve una string que describe el tipo de error que es.

Devuelve

Devuelve la excepción subyacente que causa este error, si existe.

Devuelve

the underlying exception causing this error, or null if not caused by an exception.

public String toString ()

Anulaciones

toString en clase Throwable

Volver

UserProfile

En esta página