public class TLcdWMSServiceException extends Exception
TLcdOGCWMSCommandDispatcher
and
TLcdOGCSLDWMSCommandDispatcher
, when the request URL contains invalid parameters
or invalid values.
Following the WMS specification, this class defines a set of predefined exception codes.
If one of these exception codes is used, the method getMessage
returns
a meaningful error message. In all other cases, an error message based on Throwable.getMessage
is returned. The exception code can be retrieved separately by the method getCode
.Modifier and Type | Field and Description |
---|---|
static String |
AUTHENTICATION_REQUIRED
The user is not authenticated.
|
static String |
CURRENT_UPDATE_SEQUENCE
The value of the update sequence parameter is equal to the current value of Capabilities XML update sequence number.
|
static String |
INVALID_CRS
The value of the CRS parameter is invalid.
|
static String |
INVALID_DIMENSION_VALUE
The value of a sample dimension is in valid.
|
static String |
INVALID_FORMAT
The value of the FORMAT parameter is invalid.
|
static String |
INVALID_POINT
The value of the query point for the GetFeatureInfo request.
|
static String |
INVALID_SRS
Deprecated.
Use the code
INVALID_CRS instead. |
static String |
INVALID_UPDATE_SEQUENCE
The value of the update sequence parameter is greater to the current value of Capabilities XML update sequence number.
|
static String |
LAYER_NOT_AUTHORIZED
The user is not authorized for the layer.
|
static String |
LAYER_NOT_DEFINED
The value of the LAYER parameter contains a layer that is not defined in the capabilities.
|
static String |
LAYER_NOT_QUERYABLE
The value of the QUERY_LAYER parameter contains a layer that is not queryable .
|
static String |
MISSING_DIMENSION_VALUE
The value of a sample dimension is missing and no default value is set.
|
static String |
OPERATION_NOT_SUPPORTED
The request is for an operation that is not supported.
|
static String |
STYLE_NOT_DEFINED
The value of the STYLES parameter contains a style that is not valid for the corresponding layer.
|
Constructor and Description |
---|
TLcdWMSServiceException(String aMessage)
Constructs a new
TLcdWMSServiceException with the given message. |
TLcdWMSServiceException(String aExceptionCode,
String aEntityName)
Constructs a new
TLcdWMSServiceException with the given exception code and entity name. |
TLcdWMSServiceException(String aExceptionCode,
String aEntityName,
String aInformation)
Constructs a new
TLcdWMSServiceException with the given parameters. |
Modifier and Type | Method and Description |
---|---|
String |
getCode()
Returns the service exception code.
|
String |
getMessage()
Returns the message of this service exception code.
|
String |
toString()
Returns the message of this service exception (see
getMessage ). |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public static final String INVALID_FORMAT
public static final String INVALID_CRS
public static final String INVALID_SRS
INVALID_CRS
instead.INVALID_CRS
,
Constant Field Valuespublic static final String LAYER_NOT_DEFINED
public static final String LAYER_NOT_QUERYABLE
public static final String STYLE_NOT_DEFINED
public static final String CURRENT_UPDATE_SEQUENCE
public static final String INVALID_UPDATE_SEQUENCE
public static final String MISSING_DIMENSION_VALUE
public static final String INVALID_DIMENSION_VALUE
public static final String INVALID_POINT
public static final String OPERATION_NOT_SUPPORTED
public static final String LAYER_NOT_AUTHORIZED
public static final String AUTHENTICATION_REQUIRED
public TLcdWMSServiceException(String aExceptionCode, String aEntityName, String aInformation)
TLcdWMSServiceException
with the given parameters.
The parameters are used to construct a meaningful error message, returned by getMessage
.
The exception code indicates the root cause of the exception; for example, a request that refers to
an undefined layer (LAYER_NOT_DEFINED
) or an invalid format (INVALID_FORMAT
) .
The entity name parameter refers to the entity that causes the exception; for example, the
name of the undefined layer or format.
The information parameter is used to specify additional information regarding the exception.
For the predefined exception codes listed in this class, it is only used for the exception STYLE_NOT_DEFINED
,
to refer to the layer for which the undefined style was requested.aExceptionCode
- the exception code (e.g., INVALID_FORMAT
).aEntityName
- the name of the object that causes the exception (e.g., the name of the undefined format).aInformation
- the layer name, in case of a .public TLcdWMSServiceException(String aExceptionCode, String aEntityName)
TLcdWMSServiceException
with the given exception code and entity name.
The parameters are used to construct a meaningful error message, returned by getMessage
.
The exception code indicates the root cause of the exception; for example, a request that refers to
an undefined layer (LAYER_NOT_DEFINED
) or an invalid format (INVALID_FORMAT
) .
The entity name parameter refers to the entity that causes the exception; for example, the
name of the undefined layer or format.aExceptionCode
- the exception code (e.g., INVALID_FORMAT
).aEntityName
- the name of the object that causes the exception (e.g., the name of the undefined format).public TLcdWMSServiceException(String aMessage)
TLcdWMSServiceException
with the given message.
The message can be retrieved by the method getMessage
.aMessage
- the exception message.public String getCode()
public String getMessage()
Throwable.getMessage
is returned.getMessage
in class Throwable
public String toString()
getMessage
).