Package com.azure.common.mgmt
Class CloudException
-
- All Implemented Interfaces:
Serializable
public final class CloudException extends HttpRequestException
Exception thrown for an invalid response with custom error information.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CloudException(String message, HttpResponse response)Initializes a new instance of the CloudException class.CloudException(String message, HttpResponse response, CloudError body)Initializes a new instance of the CloudException class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringtoString()CloudErrorvalue()-
Methods inherited from class com.azure.common.exception.HttpRequestException
response
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
CloudException
public CloudException(String message, HttpResponse response)
Initializes a new instance of the CloudException class.- Parameters:
message- the exception message or the response content if a message is not availableresponse- the HTTP response
-
CloudException
public CloudException(String message, HttpResponse response, CloudError body)
Initializes a new instance of the CloudException class.- Parameters:
message- the exception message or the response content if a message is not availableresponse- the HTTP responsebody- the deserialized response body
-
-
Method Detail
-
value
public CloudError value()
- Overrides:
valuein classHttpRequestException- Returns:
- the HTTP response value
-
-