Class TLcdWMSServiceException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.luciad.wms.server.TLcdWMSServiceException
All Implemented Interfaces:
Serializable

public class TLcdWMSServiceException extends Exception
Class to handle the exceptions thrown by 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.

See Also:
  • Field Details

    • INVALID_FORMAT

      public static final String INVALID_FORMAT
      The value of the FORMAT parameter is invalid.
      See Also:
    • INVALID_CRS

      public static final String INVALID_CRS
      The value of the CRS parameter is invalid.
      See Also:
    • INVALID_SRS

      public static final String INVALID_SRS
      Deprecated.
      Use the code INVALID_CRS instead.
      The value of the SRS parameter is invalid.
      See Also:
    • LAYER_NOT_DEFINED

      public static final String LAYER_NOT_DEFINED
      The value of the LAYER parameter contains a layer that is not defined in the capabilities.
      See Also:
    • LAYER_NOT_QUERYABLE

      public static final String LAYER_NOT_QUERYABLE
      The value of the QUERY_LAYER parameter contains a layer that is not queryable .
      See Also:
    • STYLE_NOT_DEFINED

      public static final String STYLE_NOT_DEFINED
      The value of the STYLES parameter contains a style that is not valid for the corresponding layer.
      See Also:
    • CURRENT_UPDATE_SEQUENCE

      public static final String CURRENT_UPDATE_SEQUENCE
      The value of the update sequence parameter is equal to the current value of Capabilities XML update sequence number.
      See Also:
    • INVALID_UPDATE_SEQUENCE

      public static final String INVALID_UPDATE_SEQUENCE
      The value of the update sequence parameter is greater to the current value of Capabilities XML update sequence number.
      See Also:
    • MISSING_DIMENSION_VALUE

      public static final String MISSING_DIMENSION_VALUE
      The value of a sample dimension is missing and no default value is set.
      See Also:
    • INVALID_DIMENSION_VALUE

      public static final String INVALID_DIMENSION_VALUE
      The value of a sample dimension is in valid.
      See Also:
    • INVALID_POINT

      public static final String INVALID_POINT
      The value of the query point for the GetFeatureInfo request.
      See Also:
    • OPERATION_NOT_SUPPORTED

      public static final String OPERATION_NOT_SUPPORTED
      The request is for an operation that is not supported.
      See Also:
    • LAYER_NOT_AUTHORIZED

      public static final String LAYER_NOT_AUTHORIZED
      The user is not authorized for the layer.
      Since:
      2017.0
      See Also:
    • AUTHENTICATION_REQUIRED

      public static final String AUTHENTICATION_REQUIRED
      The user is not authenticated.
      Since:
      2017.0
      See Also:
    • FILTER_ERROR

      public static final String FILTER_ERROR
      The filter can not be parsed or does not match the layer count.
      Since:
      2024.0
      See Also:
  • Constructor Details

    • TLcdWMSServiceException

      public TLcdWMSServiceException(String aExceptionCode, String aEntityName, String aInformation)
      Constructs a new 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.

      Parameters:
      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 .
    • TLcdWMSServiceException

      public TLcdWMSServiceException(String aExceptionCode, String aEntityName)
      Constructs a new 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.

      Parameters:
      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).
    • TLcdWMSServiceException

      public TLcdWMSServiceException(String aMessage)
      Constructs a new TLcdWMSServiceException with the given message.

      The message can be retrieved by the method getMessage.

      Parameters:
      aMessage - the exception message.
  • Method Details

    • getCode

      public String getCode()
      Returns the service exception code.
      Returns:
      the service exception code.
    • getMessage

      public String getMessage()
      Returns the message of this service exception code.

      If one of the predefined exception codes is used, a meaningful error message is returned. In all other cases, an error message based on the result of Throwable.getMessage is returned.

      Overrides:
      getMessage in class Throwable
      Returns:
      the message of this service exception code.
    • toString

      public String toString()
      Returns the message of this service exception (see getMessage).
      Overrides:
      toString in class Throwable
      Returns:
      the message of this service exception.