Package com.azure.core.exception
Class ResourceExistsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.azure.core.exception.AzureException
com.azure.core.exception.HttpResponseException
com.azure.core.exception.ResourceExistsException
- All Implemented Interfaces:
Serializable
The ResourceExistsException represents an exception thrown when an HTTP request attempts to create a
resource that already exists.
This exception is typically thrown when the service responds with a status code of 4XX, typically 412 conflict.
This class also provides methods to get the HttpResponse that was received when the exception occurred and
the deserialized HTTP response value.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionResourceExistsException(String message, HttpResponse response) Initializes a new instance of the ResourceExistsException class.ResourceExistsException(String message, HttpResponse response, Object value) Initializes a new instance of the ResourceExistsException class.ResourceExistsException(String message, HttpResponse response, Throwable cause) Initializes a new instance of the ResourceExistsException class. -
Method Summary
Methods inherited from class com.azure.core.exception.HttpResponseException
getResponse, getValueMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ResourceExistsException
Initializes a new instance of the ResourceExistsException class.- Parameters:
message- the exception message or the response content if a message is not availableresponse- the HTTP response
-
ResourceExistsException
Initializes a new instance of the ResourceExistsException class.- Parameters:
message- the exception message or the response content if a message is not availableresponse- the HTTP responsevalue- the deserialized response value
-
ResourceExistsException
Initializes a new instance of the ResourceExistsException class.- Parameters:
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 ResourceExistsException
-