public class RestException extends RuntimeException
| Constructor and Description |
|---|
RestException(String message,
HttpResponse response)
Initializes a new instance of the RestException class.
|
RestException(String message,
HttpResponse response,
Object body)
Initializes a new instance of the RestException class.
|
RestException(String message,
HttpResponse response,
Throwable cause)
Initializes a new instance of the RestException class.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
body() |
HttpResponse |
response() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic RestException(String message, HttpResponse response)
message - the exception message or the response content if a message is not availableresponse - the HTTP responsepublic RestException(String message, HttpResponse response, Object body)
message - the exception message or the response content if a message is not availableresponse - the HTTP responsebody - the deserialized response bodypublic RestException(String message, HttpResponse response, Throwable cause)
message - the exception message or the response content if a message is not availableresponse - the HTTP responsecause - the Throwable which caused the creation of this RestExceptionpublic HttpResponse response()
public Object body()
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/