Package com.oracle.bmc.model
Class BmcException
- java.lang.Object
- 
- java.lang.Throwable
- 
- java.lang.Exception
- 
- java.lang.RuntimeException
- 
- com.oracle.bmc.model.SdkRuntimeException
- 
- com.oracle.bmc.model.BmcException
 
 
 
 
 
- 
- All Implemented Interfaces:
- Serializable
 - Direct Known Subclasses:
- AuthClientException,- AuthServerException
 
 public class BmcException extends SdkRuntimeException - See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringOPC_REQUEST_ID_HEADERName of the header that contains the request id.
 - 
Constructor SummaryConstructors Constructor Description BmcException(boolean timeout, String message, Throwable cause, String opcRequestId)BmcException(int statusCode, String serviceCode, String message, String opcRequestId)BmcException(int statusCode, String serviceCode, String message, String opcRequestId, ServiceDetails serviceDetails)BmcException(int statusCode, String serviceCode, String message, String opcRequestId, ServiceDetails serviceDetails, String originalMessage, String originalMessageTemplate, Map<String,String> messageArguments)BmcException(int statusCode, String serviceCode, String message, String opcRequestId, ServiceDetails serviceDetails, String originalMessage, String originalMessageTemplate, Map<String,String> messageArguments, Map<String,String> additionalProperties)BmcException(int statusCode, String serviceCode, String message, String opcRequestId, Throwable cause)BmcException(int statusCode, String serviceCode, String message, String opcRequestId, Throwable cause, ServiceDetails serviceDetails)BmcException(String message, Throwable cause, int statusCode, String serviceCode, boolean timeout, String opcRequestId, boolean isClientSide, ServiceDetails serviceDetails, String originalMessage, String originalMessageTemplate, Map<String,String> messageArguments)BmcException(String message, Throwable cause, int statusCode, String serviceCode, boolean timeout, String opcRequestId, boolean isClientSide, ServiceDetails serviceDetails, String originalMessage, String originalMessageTemplate, Map<String,String> messageArguments, Map<String,String> additionalProperties)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BmcExceptioncreateClientSide(String message, Throwable cause, String opcRequestId, ServiceDetails serviceDetails)Map<String,String>getAdditionalProperties()Gets the unknown attributes of the failed Exception.StringgetMessage()Map<String,String>getMessageArguments()Gets the template arguments of the failed Exception.StringgetOpcRequestId()The opc-request-id header returned by the service that should be provided for support requests.StringgetOriginalMessage()Gets the original message of the failed Exception.StringgetOriginalMessageTemplate()Gets the original message template of the failed Exception.StringgetServiceCode()Service specific code returned.ServiceDetailsgetServiceDetails()Gets the service details of the failed Exception.intgetStatusCode()The HTTP status code.StringgetUnmodifiedMessage()Returns the exception message, without adding additional troubleshooting information to it.booleanisClientSide()Flag to indicate that the exception originated from the client and not from the service.booleanisTimeout()Flag to indicate that the request timed out.- 
Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
- 
 
- 
- 
- 
Field Detail- 
OPC_REQUEST_ID_HEADERpublic static final String OPC_REQUEST_ID_HEADER Name of the header that contains the request id.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
BmcExceptionpublic BmcException(int statusCode, String serviceCode, String message, String opcRequestId, Throwable cause)
 - 
BmcExceptionpublic BmcException(int statusCode, String serviceCode, String message, String opcRequestId, Throwable cause, ServiceDetails serviceDetails)
 - 
BmcExceptionpublic BmcException(int statusCode, String serviceCode, String message, String opcRequestId)
 - 
BmcExceptionpublic BmcException(int statusCode, String serviceCode, String message, String opcRequestId, ServiceDetails serviceDetails)
 - 
BmcExceptionpublic BmcException(int statusCode, String serviceCode, String message, String opcRequestId, ServiceDetails serviceDetails, String originalMessage, String originalMessageTemplate, Map<String,String> messageArguments)
 - 
BmcExceptionpublic BmcException(int statusCode, String serviceCode, String message, String opcRequestId, ServiceDetails serviceDetails, String originalMessage, String originalMessageTemplate, Map<String,String> messageArguments, Map<String,String> additionalProperties)
 - 
BmcExceptionpublic BmcException(boolean timeout, String message, Throwable cause, String opcRequestId)
 - 
BmcExceptionpublic BmcException(String message, Throwable cause, int statusCode, String serviceCode, boolean timeout, String opcRequestId, boolean isClientSide, ServiceDetails serviceDetails, String originalMessage, String originalMessageTemplate, Map<String,String> messageArguments, Map<String,String> additionalProperties) 
 
- 
 - 
Method Detail- 
createClientSidepublic static BmcException createClientSide(String message, Throwable cause, String opcRequestId, ServiceDetails serviceDetails) 
 - 
getMessagepublic String getMessage() - Overrides:
- getMessagein class- Throwable
 
 - 
getUnmodifiedMessagepublic String getUnmodifiedMessage() Returns the exception message, without adding additional troubleshooting information to it.- Returns:
- unmodified exception message
 
 - 
getStatusCodepublic int getStatusCode() The HTTP status code.
 - 
getServiceCodepublic String getServiceCode() Service specific code returned.Null if the client timed out or failed to get a response from the service. 
 - 
isTimeoutpublic boolean isTimeout() Flag to indicate that the request timed out.Status code and service code should not be used if this is true. 
 - 
getOpcRequestIdpublic String getOpcRequestId() The opc-request-id header returned by the service that should be provided for support requests.If the client timed out or failed to get a response from the service, then this is the outbound request id, i.e. either the value for the OPC_REQUEST_ID_HEADERheader set by the caller in an invocation callback, or otherwise a value automatically generated by the SDK.
 - 
isClientSidepublic boolean isClientSide() Flag to indicate that the exception originated from the client and not from the service.Status code and service code should not be used if this is true. 
 - 
getServiceDetailspublic ServiceDetails getServiceDetails() Gets the service details of the failed Exception.null in the case of client-side exceptions 
 - 
getOriginalMessagepublic String getOriginalMessage() Gets the original message of the failed Exception.null in the case of non-localized responses. 
 - 
getOriginalMessageTemplatepublic String getOriginalMessageTemplate() Gets the original message template of the failed Exception.null in the case of non-localized responses. 
 - 
getMessageArgumentspublic Map<String,String> getMessageArguments() Gets the template arguments of the failed Exception.null in the case of non-localized responses. 
 
- 
 
-