RestException Classe

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.microsoft.bot.restclient.RestException

public class RestException
extends java.lang.RuntimeException

Eccezione generata per una risposta non valida con informazioni sull'errore personalizzate.

Riepilogo dei costruttori

Costruttore Descrizione
RestException(String message, Response<ResponseBody> response)

Inizializza una nuova istanza della classe RestException.

RestException(String message, Response<ResponseBody> response, Object body)

Inizializza una nuova istanza della classe RestException.

Riepilogo dei metodi

Modificatore e tipo Metodo e descrizione
java.lang.Object body()
retrofit2.Response<okhttp3.ResponseBody> response()

Metodi ereditati da java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Metodi ereditati da java.lang.Throwable

java.lang.Throwable.addSuppressed java.lang.Throwable.fillInStackTrace java.lang.Throwable.getCause java.lang.Throwable.getLocalizedMessage java.lang.Throwable.getMessage java.lang.Throwable.getStackTrace java.lang.Throwable.getSuppressed java.lang.Throwable.initCause java.lang.Throwable.printStackTrace java.lang.Throwable.printStackTrace java.lang.Throwable.printStackTrace java.lang.Throwable.setStackTrace java.lang.Throwable.toString

Dettagli costruttore

RestException

public RestException(String message, Response response)

Inizializza una nuova istanza della classe RestException.

Parametri:

message - il messaggio di eccezione o il contenuto della risposta se un messaggio non è disponibile
response - risposta HTTP

RestException

public RestException(String message, Response response, Object body)

Inizializza una nuova istanza della classe RestException.

Parametri:

message - il messaggio di eccezione o il contenuto della risposta se un messaggio non è disponibile
response - risposta HTTP
body - corpo della risposta deserializzato

Dettagli metodo

body

public Object body()

Restituisce:

corpo della risposta HTTP

response

public Response response()

Restituisce:

informazioni sulla risposta HTTP associata

Si applica a