Class ManagementError
java.lang.Object
com.azure.core.management.exception.ManagementError
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ManagementError>
public class ManagementError
extends Object
implements com.azure.json.JsonSerializable<ManagementError>
An instance of this class provides additional information about an http error response.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newManagementErrorobject.ManagementError(String code, String message) Constructs a newManagementErrorobject. -
Method Summary
Modifier and TypeMethodDescriptionstatic ManagementErrorfromJson(com.azure.json.JsonReader jsonReader) Reads a JSON stream into aManagementError.Gets the additional info for the error.getCode()Gets the error code parsed from the body of the http error response.List<? extends ManagementError> Gets the details for the error.Gets the error message.Gets the target of the error.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ManagementError
public ManagementError()Constructs a newManagementErrorobject. -
ManagementError
Constructs a newManagementErrorobject.- Parameters:
code- the error code.message- the error message.
-
-
Method Details
-
getCode
Gets the error code parsed from the body of the http error response.- Returns:
- the error code parsed from the body of the http error response.
-
getMessage
Gets the error message.- Returns:
- the error message.
-
getTarget
Gets the target of the error.- Returns:
- the target of the error.
-
getDetails
Gets the details for the error.- Returns:
- the details for the error.
-
getAdditionalInfo
Gets the additional info for the error.- Returns:
- the additional info for the error.
-
toString
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ManagementError>- Throws:
IOException
-
fromJson
Reads a JSON stream into aManagementError.- Parameters:
jsonReader- TheJsonReaderbeing read.- Returns:
- The
ManagementErrorthat the JSON stream represented, or null if it pointed to JSON null. - Throws:
IOException- If aManagementErrorfails to be read from thejsonReader.
-