public class DXAPIException extends RuntimeException
| Constructor and Description |
|---|
DXAPIException(String message,
int statusCode)
Initializes a new exception with the specified message and HTTP status
code.
|
| Modifier and Type | Method and Description |
|---|---|
static DXAPIException |
getInstance(String errorType,
String errorMessage,
int statusCode)
Constructs a
DXAPIException of the appropriate subclass based on
the errorType. |
int |
getStatusCode()
Returns the HTTP status code associated with the error.
|
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic DXAPIException(String message, int statusCode)
public static DXAPIException getInstance(String errorType, String errorMessage, int statusCode)
DXAPIException of the appropriate subclass based on
the errorType. If the errorType is not one of the
recognized subclasses, a generic DXAPIException object is
returned.errorType - String containing a DNAnexus error type, e.g.
InvalidInputerrorMessage - String indicating the nature of the error.statusCode - HTTP status code of the response body.DXAPIException or one of its subclasses.public int getStatusCode()
Copyright © 2023. All Rights Reserved.