public class TAPException
extends java.lang.Exception
Any exception that occurred while a TAP service activity.
Most of the time this exception wraps another exception (e.g. UWSException
).
It contains an HTTP status code, set by default to HTTP-500 (Internal Server Error).
Constructor and Description |
---|
TAPException(java.lang.String message)
Standard TAP exception: no ADQL query or execution status specified.
|
TAPException(java.lang.String message,
int httpErrorCode)
Standard TAP exception: no ADQL query or execution status specified.
|
TAPException(java.lang.String message,
int httpErrorCode,
java.lang.String query)
TAP exception with the ADQL query which were executed when the error occurred.
|
TAPException(java.lang.String message,
int httpErrorCode,
java.lang.String query,
ExecutionProgression status)
TAP exception with the ADQL query which were executed when the error occurred,
AND with its execution status (e.g.
|
TAPException(java.lang.String message,
java.lang.String query)
TAP exception with the ADQL query which were executed when the error occurred.
|
TAPException(java.lang.String message,
java.lang.String query,
ExecutionProgression status)
TAP exception with the ADQL query which were executed when the error occurred,
AND with its execution status (e.g.
|
TAPException(java.lang.String message,
java.lang.Throwable cause)
Build a
TAPException with the given message and cause. |
TAPException(java.lang.String message,
java.lang.Throwable cause,
int httpErrorCode)
Build a
TAPException with the given message and cause. |
TAPException(java.lang.String message,
java.lang.Throwable cause,
int httpErrorCode,
java.lang.String query)
Build a
TAPException with the given message and cause,
AND with the ADQL query which were executed when the error occurred. |
TAPException(java.lang.String message,
java.lang.Throwable cause,
int httpErrorCode,
java.lang.String query,
ExecutionProgression status)
Build a
TAPException with the given message and cause,
AND with the ADQL query which were executed when the error occurred
AND with its execution status (e.g. |
TAPException(java.lang.String message,
java.lang.Throwable cause,
java.lang.String query)
Build a
TAPException with the given message and cause,
AND with the ADQL query which were executed when the error occurred. |
TAPException(java.lang.String message,
java.lang.Throwable cause,
java.lang.String query,
ExecutionProgression status)
Build a
TAPException with the given message and cause,
AND with the ADQL query which were executed when the error occurred
AND with its execution status (e.g. |
TAPException(java.lang.Throwable cause)
Build a
TAPException with the given cause. |
TAPException(java.lang.Throwable cause,
int httpErrorCode)
Build a
TAPException with the given cause. |
TAPException(java.lang.Throwable cause,
int httpErrorCode,
java.lang.String query)
Build a
TAPException with the given cause AND with the ADQL query which were executed when the error occurred. |
TAPException(java.lang.Throwable cause,
int httpErrorCode,
java.lang.String query,
ExecutionProgression status)
Build a
TAPException with the given cause AND with the ADQL query which were executed when the error occurred
AND with its execution status (e.g. |
TAPException(java.lang.Throwable cause,
java.lang.String query)
Build a
TAPException with the given cause AND with the ADQL query which were executed when the error occurred. |
TAPException(java.lang.Throwable cause,
java.lang.String query,
ExecutionProgression status)
Build a
TAPException with the given cause AND with the ADQL query which were executed when the error occurred
AND with its execution status (e.g. |
TAPException(UWSException ue)
TAP exception wrapping the given
UWSException . |
TAPException(UWSException cause,
int httpErrorCode)
TAP exception wrapping the given
UWSException . |
TAPException(UWSException cause,
int httpErrorCode,
ExecutionProgression status)
TAP exception wrapping the given
UWSException and storing the current ADQL query execution status. |
Modifier and Type | Method and Description |
---|---|
ExecutionProgression |
getExecutionStatus()
Get the execution status/phase of an ADQL query when the error occurred.
|
int |
getHttpErrorCode()
Get the HTTP status code to set in the HTTP response.
|
java.lang.String |
getQuery()
Get the ADQL query which were executed when the error occurred.
|
public TAPException(java.lang.String message)
message
- Message explaining the error.public TAPException(java.lang.String message, int httpErrorCode)
message
- Message explaining the error.httpErrorCode
- HTTP response status code. (if ≤ 0, 500 will be set by default)public TAPException(java.lang.String message, java.lang.String query)
message
- Message explaining the error.query
- The ADQL query which were executed when the error occurred.public TAPException(java.lang.String message, int httpErrorCode, java.lang.String query)
message
- Message explaining the error.httpErrorCode
- HTTP response status code. (if ≤ 0, 500 will be set by default)query
- The ADQL query which were executed when the error occurred.public TAPException(java.lang.String message, java.lang.String query, ExecutionProgression status)
message
- Message explaining the error.query
- The ADQL query which were executed when the error occurred.status
- Execution status/phase of the given ADQL query when the error occurred.public TAPException(java.lang.String message, int httpErrorCode, java.lang.String query, ExecutionProgression status)
message
- Message explaining the error.httpErrorCode
- HTTP response status code. (if ≤ 0, 500 will be set by default)query
- The ADQL query which were executed when the error occurred.status
- Execution status/phase of the given ADQL query when the error occurred.public TAPException(UWSException ue)
TAP exception wrapping the given UWSException
.
The message of this TAP exception will be exactly the same as the one of the given exception.
Besides, the cause of this TAP exception will be the cause of the given exception ONLY if it has one ; otherwise it will the given exception.
The HTTP status code will be the same as the one of the given UWSException
.
ue
- The exception to wrap.public TAPException(UWSException cause, int httpErrorCode)
TAP exception wrapping the given UWSException
.
The message of this TAP exception will be exactly the same as the one of the given exception.
Besides, the cause of this TAP exception will be the cause of the given exception ONLY if it has one ; otherwise it will the given exception.
The HTTP status code will be the one given in second parameter.
cause
- The exception to wrap.httpErrorCode
- HTTP response status code. (if ≤ 0, 500 will be set by default)public TAPException(UWSException cause, int httpErrorCode, ExecutionProgression status)
TAP exception wrapping the given UWSException
and storing the current ADQL query execution status.
The message of this TAP exception will be exactly the same as the one of the given exception.
Besides, the cause of this TAP exception will be the cause of the given exception ONLY if it has one ; otherwise it will the given exception.
The HTTP status code will be the one given in second parameter.
cause
- The exception to wrap.httpErrorCode
- HTTP response status code. (if ≤ 0, 500 will be set by default)status
- Execution status/phase of the given ADQL query when the error occurred.public TAPException(java.lang.Throwable cause)
TAPException
with the given cause. The built exception will have NO MESSAGE.
No execution status specified.
The corresponding HTTP status code will be HTTP-500 (Internal Server Error).cause
- The cause of this exception.public TAPException(java.lang.Throwable cause, int httpErrorCode)
TAPException
with the given cause. The built exception will have NO MESSAGE.
No execution status specified.
The corresponding HTTP status code is set by the second parameter.cause
- The cause of this exception.httpErrorCode
- HTTP response status code. (if ≤ 0, 500 will be set by default)public TAPException(java.lang.Throwable cause, java.lang.String query)
TAPException
with the given cause AND with the ADQL query which were executed when the error occurred.
The built exception will have NO MESSAGE.
No execution status specified.
The corresponding HTTP status code will be HTTP-500 (Internal Server Error).cause
- The cause of this exception.query
- The ADQL query which were executed when the error occurred.public TAPException(java.lang.Throwable cause, int httpErrorCode, java.lang.String query)
TAPException
with the given cause AND with the ADQL query which were executed when the error occurred.
The built exception will have NO MESSAGE.
No execution status specified.
The corresponding HTTP status code is set by the second parameter.cause
- The cause of this exception.httpErrorCode
- HTTP response status code. (if ≤ 0, 500 will be set by default)query
- The ADQL query which were executed when the error occurred.public TAPException(java.lang.Throwable cause, java.lang.String query, ExecutionProgression status)
TAPException
with the given cause AND with the ADQL query which were executed when the error occurred
AND with its execution status (e.g. uploading, parsing, executing, ...).
The built exception will have NO MESSAGE.
The corresponding HTTP status code will be HTTP-500 (Internal Server Error).cause
- The cause of this exception.query
- The ADQL query which were executed when the error occurred.status
- Execution status/phase of the given ADQL query when the error occurred.public TAPException(java.lang.Throwable cause, int httpErrorCode, java.lang.String query, ExecutionProgression status)
TAPException
with the given cause AND with the ADQL query which were executed when the error occurred
AND with its execution status (e.g. uploading, parsing, executing, ...).
The built exception will have NO MESSAGE.
The corresponding HTTP status code is set by the second parameter.cause
- The cause of this exception.httpErrorCode
- HTTP response status code. (if ≤ 0, 500 will be set by default)query
- The ADQL query which were executed when the error occurred.status
- Execution status/phase of the given ADQL query when the error occurred.public TAPException(java.lang.String message, java.lang.Throwable cause)
TAPException
with the given message and cause.
No execution status specified.
The corresponding HTTP status code will be HTTP-500 (Internal Server Error).message
- Message of this exception.cause
- The cause of this exception.public TAPException(java.lang.String message, java.lang.Throwable cause, int httpErrorCode)
TAPException
with the given message and cause.
No execution status specified.
The corresponding HTTP status code is set by the third parameter.message
- Message of this exception.cause
- The cause of this exception.httpErrorCode
- HTTP response status code. (if ≤ 0, 500 will be set by default)public TAPException(java.lang.String message, java.lang.Throwable cause, java.lang.String query)
TAPException
with the given message and cause,
AND with the ADQL query which were executed when the error occurred.
No execution status specified.
The corresponding HTTP status code will be HTTP-500 (Internal Server Error).message
- Message of this exception.cause
- The cause of this exception.query
- The ADQL query which were executed when the error occurred.public TAPException(java.lang.String message, java.lang.Throwable cause, int httpErrorCode, java.lang.String query)
TAPException
with the given message and cause,
AND with the ADQL query which were executed when the error occurred.
No execution status specified.
The corresponding HTTP status code is set by the third parameter.message
- Message of this exception.cause
- The cause of this exception.httpErrorCode
- HTTP response status code. (if ≤ 0, 500 will be set by default)query
- The ADQL query which were executed when the error occurred.public TAPException(java.lang.String message, java.lang.Throwable cause, java.lang.String query, ExecutionProgression status)
TAPException
with the given message and cause,
AND with the ADQL query which were executed when the error occurred
AND with its execution status (e.g. uploading, parsing, executing, ...).
No execution status specified.
The corresponding HTTP status code will be HTTP-500 (Internal Server Error).message
- Message of this exception.cause
- The cause of this exception.query
- The ADQL query which were executed when the error occurred.status
- Execution status/phase of the given ADQL query when the error occurred.public TAPException(java.lang.String message, java.lang.Throwable cause, int httpErrorCode, java.lang.String query, ExecutionProgression status)
TAPException
with the given message and cause,
AND with the ADQL query which were executed when the error occurred
AND with its execution status (e.g. uploading, parsing, executing, ...).
No execution status specified.
The corresponding HTTP status code is set by the third parameter.message
- Message of this exception.cause
- The cause of this exception.httpErrorCode
- HTTP response status code. (if ≤ 0, 500 will be set by default)query
- The ADQL query which were executed when the error occurred.status
- Execution status/phase of the given ADQL query when the error occurred.public int getHttpErrorCode()
Get the HTTP status code to set in the HTTP response.
If the set value is ≤ 0, 500 will be returned instead.
public java.lang.String getQuery()
public ExecutionProgression getExecutionStatus()