public class BmcException extends SdkRuntimeException
Modifier and Type | Field and Description |
---|---|
static String |
OPC_REQUEST_ID_HEADER
Name of the header that contains the request id.
|
Constructor and 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,
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) |
Modifier and Type | Method and Description |
---|---|
static BmcException |
createClientSide(String message,
Throwable cause,
String opcRequestId,
ServiceDetails serviceDetails) |
String |
getMessage() |
Map<String,String> |
getMessageArguments()
Gets the template arguments of the failed Exception.
|
String |
getOpcRequestId()
The opc-request-id header returned by the service that should be provided for support
requests.
|
String |
getOriginalMessage()
Gets the original message of the failed Exception.
|
String |
getOriginalMessageTemplate()
Gets the original message template of the failed Exception.
|
String |
getServiceCode()
Service specific code returned.
|
ServiceDetails |
getServiceDetails()
Gets the service details of the failed Exception.
|
int |
getStatusCode()
The HTTP status code.
|
String |
getUnmodifiedMessage()
Returns the exception message, without adding additional troubleshooting information to it.
|
boolean |
isClientSide()
Flag to indicate that the exception originated from the client and not from the service.
|
boolean |
isTimeout()
Flag to indicate that the request timed out.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final String OPC_REQUEST_ID_HEADER
Name of the header that contains the request id.
public BmcException(int statusCode, String serviceCode, String message, String opcRequestId, Throwable cause)
public BmcException(int statusCode, String serviceCode, String message, String opcRequestId, Throwable cause, ServiceDetails serviceDetails)
public BmcException(int statusCode, String serviceCode, String message, String opcRequestId)
public BmcException(int statusCode, String serviceCode, String message, String opcRequestId, ServiceDetails serviceDetails)
public BmcException(int statusCode, String serviceCode, String message, String opcRequestId, ServiceDetails serviceDetails, String originalMessage, String originalMessageTemplate, Map<String,String> messageArguments)
public BmcException(boolean timeout, String message, Throwable cause, String opcRequestId)
public static BmcException createClientSide(String message, Throwable cause, String opcRequestId, ServiceDetails serviceDetails)
public String getMessage()
getMessage
in class Throwable
public String getUnmodifiedMessage()
Returns the exception message, without adding additional troubleshooting information to it.
public int getStatusCode()
The HTTP status code.
public String getServiceCode()
Service specific code returned. Null if the client timed out or failed to get a response from the service.
public boolean isTimeout()
Flag to indicate that the request timed out. Status code and service code should not be used if this is true.
public 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_HEADER
header set by the caller in an invocation callback, or otherwise a value automatically
generated by the SDK.
public 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.
public ServiceDetails getServiceDetails()
Gets the service details of the failed Exception. null in the case of client-side exceptions
public String getOriginalMessage()
Gets the original message of the failed Exception. null in the case of non-localized responses.
public String getOriginalMessageTemplate()
Gets the original message template of the failed Exception. null in the case of non-localized responses.
Copyright © 2016–2024. All rights reserved.