public class ExtractorException extends java.lang.Exception implements HttpErrorCodeProvider
ERROR_CODE_CONFLICT, ERROR_CODE_INTERNAL_ERROR, ERROR_CODE_NOT_FOUND, ERROR_CODE_NOT_SET
Constructor and Description |
---|
ExtractorException()
Creates a new instance of
ExtractorException without detail message. |
ExtractorException(java.lang.String msg)
Constructs an instance of
ExtractorException with the specified detail message. |
ExtractorException(java.lang.String msg,
int httpErrorCode)
Constructs an instance of
ExtractorException with the specified detail message
and HTTP error code to be returned. |
ExtractorException(java.lang.String msg,
java.lang.Throwable cause)
Constructs an instance of
ExtractorException with the
specified detail message and cause. |
Modifier and Type | Method and Description |
---|---|
int |
getHttpErrorCode()
Returns a HTTP error code to be returned to the HTTP client.
|
boolean |
isHttpErrorCodeSet()
Returns true, if the HTTP code was set, false otherwise.
|
void |
setHttpErrorCode(int httpErrorCode)
Sets a new HTTP code to be later returned by this provider.
|
public ExtractorException()
ExtractorException
without detail message.public ExtractorException(java.lang.String msg)
ExtractorException
with the specified detail message.msg
- the detail message.public ExtractorException(java.lang.String msg, java.lang.Throwable cause)
ExtractorException
with the
specified detail message and cause.msg
- the detail message.cause
- the cause which is saved for later retrieval by the
Throwable.getCause()
method); a null value is
permitted, and indicates that the cause is nonexistent or
unknownpublic ExtractorException(java.lang.String msg, int httpErrorCode)
ExtractorException
with the specified detail message
and HTTP error code to be returned.msg
- the detail message.httpErrorCode
- HTTP error code to be returned, if this exception is raisedpublic boolean isHttpErrorCodeSet()
HttpErrorCodeProvider
isHttpErrorCodeSet
in interface HttpErrorCodeProvider
public int getHttpErrorCode()
HttpErrorCodeProvider
getHttpErrorCode
in interface HttpErrorCodeProvider
public void setHttpErrorCode(int httpErrorCode)
httpErrorCode
- a new HTTP code to be later returned by this provider.