Class TLcdOGCServiceException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.luciad.ogc.common.TLcdOGCServiceException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TLcdCSWServiceException, TLcdWCSServiceException, TLcdWFSServiceException

public class TLcdOGCServiceException extends Exception
Base class for OGC service exceptions.

This class can hold multiple TLcdOWSException instances, that each represent a subset or part of this service exception.

At least one TLcdOWSException is required, initialized through one of the constructors. Additional exceptions can be added through addException(com.luciad.ogc.ows.model.TLcdOWSException) and addException(String, int, String). The list of exceptions can be retrieved through getExceptions().

See Also:
  • Field Details Link icon

    • UNKNOWN_REQUEST Link icon

      public static final int UNKNOWN_REQUEST
      See Also:
    • REQUEST_XML_ERROR Link icon

      public static final int REQUEST_XML_ERROR
      See Also:
    • INVALID_REQUEST Link icon

      public static final int INVALID_REQUEST
      See Also:
    • CONFIG_ERROR Link icon

      public static final int CONFIG_ERROR
      See Also:
    • CURRENT_UPDATE_SEQUENCE Link icon

      public static final int CURRENT_UPDATE_SEQUENCE
      The user has specified an Update Sequence value equal to the current Update Sequence value defined in the server's capabilities.
      Since:
      2024.0
      See Also:
    • INVALID_UPDATE_SEQUENCE Link icon

      public static final int INVALID_UPDATE_SEQUENCE
      The user has specified an invalid Update Sequence value; for example, a value that is newer than the current Update Sequence value defined in the server's capabilities.
      Since:
      2024.0
      See Also:
    • NOT_AUTHORIZED Link icon

      public static final int NOT_AUTHORIZED
      The user is not authorized to access a resource.
      Since:
      2017.0
      See Also:
    • AUTHENTICATION_REQUIRED Link icon

      public static final int AUTHENTICATION_REQUIRED
      The user needs to be authenticated to access a resource.
      Since:
      2017.0
      See Also:
    • UNKNOWN_REQUEST_STR Link icon

      public static final String UNKNOWN_REQUEST_STR
      See Also:
    • REQUEST_XML_ERROR_STR Link icon

      public static final String REQUEST_XML_ERROR_STR
      See Also:
    • INVALID_REQUEST_STR Link icon

      public static final String INVALID_REQUEST_STR
      See Also:
    • CONFIG_ERROR_STR Link icon

      public static final String CONFIG_ERROR_STR
      See Also:
    • NOT_AUTHORIZED_STR Link icon

      public static final String NOT_AUTHORIZED_STR
      The user is not authorized to access a resource.
      Since:
      2017.0
      See Also:
    • AUTHENTICATION_REQUIRED_STR Link icon

      public static final String AUTHENTICATION_REQUIRED_STR
      The user needs to be authenticated to access a resource.
      Since:
      2017.0
      See Also:
  • Constructor Details Link icon

    • TLcdOGCServiceException Link icon

      public TLcdOGCServiceException(int aCode)
      Constructor with an error code.

      The given exception information is converted to a TLcdOWSException and added to the list of exceptions. This list can be retrieved through getExceptions().

      Parameters:
      aCode - the exception's error code.
    • TLcdOGCServiceException Link icon

      public TLcdOGCServiceException(String aMessage, int aCode)
      Constructor with an error message and code.

      The given exception information is converted to a TLcdOWSException and added to the list of exceptions. This list can be retrieved through getExceptions().

      Parameters:
      aMessage - the error message
      aCode - the exception's error code.
    • TLcdOGCServiceException Link icon

      public TLcdOGCServiceException(String aMessage, int aCode, String aLocator)
      Constructor with an error message, code and locator.

      The given exception information is converted to a TLcdOWSException and added to the list of exceptions. This list can be retrieved through getExceptions().

      Parameters:
      aMessage - the error message
      aCode - the exception's error code.
      aLocator - the location of the error in the client request
    • TLcdOGCServiceException Link icon

      public TLcdOGCServiceException(String aMessage, int aCode, String aLocator, String aServiceVersion, String aServiceName)
      Constructor with an error message, code, locator and service information.

      The given exception information is converted to a TLcdOWSException and added to the list of exceptions. This list can be retrieved through getExceptions().

      Parameters:
      aMessage - the error message
      aCode - the exception's error code.
      aLocator - the location of the error in the client request
      aServiceVersion - the version of the service that generated the exception.
      aServiceName - the name of the service that generated the exception.
    • TLcdOGCServiceException Link icon

      public TLcdOGCServiceException(TLcdOWSException aException, String aServiceVersion, String aServiceName)
      Constructor with an OWS exception.
      Parameters:
      aException - an OWS exception.
      aServiceVersion - the version of the service that generated the exception.
      aServiceName - the name of the service that generated the exception.
  • Method Details Link icon

    • addException Link icon

      public void addException(String aMessage, int aCode, String aLocator)
      Adds an exception with the given message, code and locator.

      This exception is converted to a TLcdOWSException, and can be retrieved through getExceptions().

      Parameters:
      aMessage - the optional error message.
      aCode - the mandatory exception's error code.
      aLocator - the location of the error in the client request, or null if this information is not available.
    • addException Link icon

      public void addException(TLcdOWSException aException)
      Adds the given OWS exception.
      Parameters:
      aException - the exception to be added.
    • getExceptions Link icon

      public List<TLcdOWSException> getExceptions()
      Returns a list of exceptions.
      Returns:
      a list of exceptions.
    • getMessage Link icon

      public String getMessage()
      Returns the error message of the first exception, if initialized.
      Overrides:
      getMessage in class Throwable
      Returns:
      the error message of the first exception, if initialized; null otherwise.
    • getCode Link icon

      public int getCode()
      Returns the error code of the first exception.
      Returns:
      the exception's error code.
    • getLocator Link icon

      public String getLocator()
      Returns the locator of the first exception, if initialized.
      Returns:
      the locator of the first exception, if initialized; null otherwise.
    • getServiceName Link icon

      public String getServiceName()
      Returns the service name generated this exception.
      Returns:
      the service name generated this exception, or null if no service name is available.
    • getServiceVersion Link icon

      public String getServiceVersion()
      Returns the version of the service that generated this exception.
      Returns:
      the version of the service that generated this exception, or null if no version information is available.
    • getCodeAsAString Link icon

      public String getCodeAsAString(int aCode)
      Returns a string describing the given error code.
      Parameters:
      aCode - the exception's error code
      Returns:
      a string describing the given error code.
    • getMimeType Link icon

      public String getMimeType()
      Returns the MIME type to be set when sending exception reports to a client.
      Returns:
      the MIME type to be set when sending exception reports to a client.