public class BmcException extends RuntimeException
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,
Throwable cause) |
Modifier and Type | Method and Description |
---|---|
String |
getMessage() |
String |
getOpcRequestId()
The opc-request-id header returned by the service that should be provided for support requests.
|
String |
getServiceCode()
Service specific code returned.
|
int |
getStatusCode()
The HTTP status code.
|
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)
public String getMessage()
getMessage
in class Throwable
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.
Copyright © 2016–2021. All rights reserved.