public class TLcdOGCServiceException extends Exception
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()
.
TLcdOWSException
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
AUTHENTICATION_REQUIRED
The user needs to be authenticated to access a resource.
|
static String |
AUTHENTICATION_REQUIRED_STR
The user needs to be authenticated to access a resource.
|
static int |
CONFIG_ERROR |
static String |
CONFIG_ERROR_STR |
static int |
INVALID_REQUEST |
static String |
INVALID_REQUEST_STR |
static int |
NOT_AUTHORIZED
The user is not authorized to access a resource.
|
static String |
NOT_AUTHORIZED_STR
The user is not authorized to access a resource.
|
static int |
REQUEST_XML_ERROR |
static String |
REQUEST_XML_ERROR_STR |
static int |
UNKNOWN_REQUEST |
static String |
UNKNOWN_REQUEST_STR |
Constructor and Description |
---|
TLcdOGCServiceException(int aCode)
Constructor with an error code.
|
TLcdOGCServiceException(String aMessage,
int aCode)
Constructor with an error message and code.
|
TLcdOGCServiceException(String aMessage,
int aCode,
String aLocator)
Constructor with an error message, code and locator.
|
TLcdOGCServiceException(String aMessage,
int aCode,
String aLocator,
String aServiceVersion,
String aServiceName)
Constructor with an error message, code, locator and service information.
|
TLcdOGCServiceException(TLcdOWSException aException,
String aServiceVersion,
String aServiceName)
Constructor with an OWS exception.
|
Modifier and Type | Method and Description |
---|---|
void |
addException(String aMessage,
int aCode,
String aLocator)
Adds an exception with the given message, code and locator.
|
void |
addException(TLcdOWSException aException)
Adds the given OWS exception.
|
int |
getCode()
Returns the error code of the first exception.
|
String |
getCodeAsAString(int aCode)
Returns a string describing the given error code.
|
List<TLcdOWSException> |
getExceptions()
Returns a list of exceptions.
|
String |
getLocator()
Returns the locator of the first exception, if initialized.
|
String |
getMessage()
Returns the error message of the first exception, if initialized.
|
String |
getMimeType()
Returns the MIME type to be set when sending exception reports to a client.
|
String |
getServiceName()
Returns the service name generated this exception.
|
String |
getServiceVersion()
Returns the version of the service that generated this exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final int UNKNOWN_REQUEST
public static final int REQUEST_XML_ERROR
public static final int INVALID_REQUEST
public static final int CONFIG_ERROR
public static final int NOT_AUTHORIZED
public static final int AUTHENTICATION_REQUIRED
public static final String UNKNOWN_REQUEST_STR
public static final String REQUEST_XML_ERROR_STR
public static final String INVALID_REQUEST_STR
public static final String CONFIG_ERROR_STR
public static final String NOT_AUTHORIZED_STR
public static final String AUTHENTICATION_REQUIRED_STR
public TLcdOGCServiceException(int aCode)
TLcdOWSException
and added to the list of exceptions. This list can be retrieved through
getExceptions()
.aCode
- the exception's error code.public TLcdOGCServiceException(String aMessage, int aCode)
TLcdOWSException
and added to the list of exceptions. This list can be retrieved through
getExceptions()
.aMessage
- the error messageaCode
- the exception's error code.public TLcdOGCServiceException(String aMessage, int aCode, String aLocator)
TLcdOWSException
and added to the list of exceptions. This list can be retrieved through
getExceptions()
.aMessage
- the error messageaCode
- the exception's error code.aLocator
- the location of the error in the client requestpublic TLcdOGCServiceException(String aMessage, int aCode, String aLocator, String aServiceVersion, String aServiceName)
TLcdOWSException
and added to the list of exceptions. This list can be retrieved through
getExceptions()
.aMessage
- the error messageaCode
- the exception's error code.aLocator
- the location of the error in the client requestaServiceVersion
- the version of the service that generated the exception.aServiceName
- the name of the service that generated the exception.public TLcdOGCServiceException(TLcdOWSException aException, String aServiceVersion, String aServiceName)
aException
- an OWS exception.aServiceVersion
- the version of the service that generated the exception.aServiceName
- the name of the service that generated the exception.public void addException(String aMessage, int aCode, String aLocator)
TLcdOWSException
,
and can be retrieved through getExceptions()
.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.public void addException(TLcdOWSException aException)
aException
- the exception to be added.public List<TLcdOWSException> getExceptions()
public String getMessage()
getMessage
in class Throwable
null
otherwise.public int getCode()
public String getLocator()
null
otherwise.public String getServiceName()
null
if no service name is available.public String getServiceVersion()
null
if no version information is available.public String getCodeAsAString(int aCode)
aCode
- the exception's error codepublic String getMimeType()