public class RESTException
extends java.io.IOException
Constructor and Description |
---|
RESTException(int code,
java.lang.String message)
Customized exception that can provide more information on REST errors
|
RESTException(int code)
Customized exception that can provide more information on REST errors
|
RESTException(java.lang.String message,
java.lang.Exception exception)
Customized exception that can provide more information on REST errors
|
RESTException(java.lang.String message)
Customized exception that can provide more information on REST errors
|
Modifier and Type | Method and Description |
---|---|
static RESTException |
create(int code,
java.lang.String streamsMessage)
Customized exception that can provide more information on REST errors
|
int |
getStatusCode()
Gets the error status code for this exception
|
com.google.gson.JsonObject |
getStreamsErrorMessageAsJson()
Gets the IBM Streams message for this exception as a Json Object
|
java.lang.String |
getStreamsErrorMessageId()
Gets the IBM Streams message ID for this exception
|
public RESTException(int code)
code
- - error message code (currently will contain only HTTP
response codes)public RESTException(int code, java.lang.String message)
code
- - error message codemessage
- - error message to be seenpublic RESTException(java.lang.String message)
message
- - error message to be seenpublic RESTException(java.lang.String message, java.lang.Exception exception)
message
- - error message to be seenexception
- - causepublic static final RESTException create(int code, java.lang.String streamsMessage)
code
- - error message code (matches HTTP response codes)RESTException
created from a code and an IBM Streams
Messagepublic int getStatusCode()
public java.lang.String getStreamsErrorMessageId()
public com.google.gson.JsonObject getStreamsErrorMessageAsJson()
JsonObject