| java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException org.geoserver.platform.ServiceException org.vfny.geoserver.ServiceException
All known Subclasses: org.vfny.geoserver.sld.SldException, org.vfny.geoserver.wcs.WcsException, org.vfny.geoserver.wms.WmsException,
ServiceException | public class ServiceException extends org.geoserver.platform.ServiceException (Code) | | Represents a standard OGC service exception. Able to turn itself into the
proper xml response.
JG - here is my guess on what the parameters do:
[?xml version="1.0" ?
[ServiceExceptionReport
version="1.2.0"
xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc SchemaBaseUrl wfs/1.0.0/OGC-exception.xsd"]
[ServiceException code="code"
locator="locator"]
preMessage:getMessage()
stack trace
[/ServiceException]
[/ServiceExceptionReport]
Where:
-
code: is a diagnostic code
-
locator: is the java class that caused the problem
-
preMessage: is your chance to place things in user terms
-
message: is the exception message
-
stack trace: is the exception strack trace
Java Exception have recently developed the ability to contain other
exceptions. By calling initCause on your ServiceConfig Exception you can
get the real exception included in the stacktrace above.
author: Gabriel Rold?n author: Chris Holmes |
locator | protected String locator(Code) | | full classpath of originating GeoServer class
|
preMessage | protected String preMessage(Code) | | message inserted by GeoServer as to what it thinks happened
|
ServiceException | public ServiceException()(Code) | | Empty constructor.
|
ServiceException | public ServiceException(String message)(Code) | | Empty constructor.
Parameters: message - The message for the . |
ServiceException | public ServiceException(String message, Throwable cause)(Code) | | This should be the most used entry point.
Parameters: message - User message Parameters: cause - The origional exception that caused failure |
ServiceException | public ServiceException(Throwable e)(Code) | | Empty constructor.
Parameters: e - The message for the . |
ServiceException | public ServiceException(String message, String locator)(Code) | | Empty constructor.
Parameters: message - The message for the . Parameters: locator - The message for the . |
ServiceException | public ServiceException(Throwable e, String preMessage, String locator)(Code) | | DOCUMENT ME!
Parameters: e - The message for the . Parameters: preMessage - The message to tack on the front. Parameters: locator - The message for the . |
getMimeType | public String getMimeType(GeoServer geoserver)(Code) | | Returns the mime type that should be exposed to the client
when sending the exception message.
Defaults to geoserver.getMimeType()
|
getXmlMessage | public String getXmlMessage(boolean printStackTrace)(Code) | | gets the message, encoding it with the proper escaped xml characters. If
requested it prints the whole stack trace in the response.
Parameters: printStackTrace - set to true if the full stack traceshould be returned to client apps. The message of this error, with xml escapes. |
getXmlResponse | public String getXmlResponse(boolean printStackTrace, HttpServletRequest request, GeoServer geoserver)(Code) | | Return request type.
Parameters: printStackTrace - whether the stack trace should be included. Parameters: request - DOCUMENT ME! The ServiceExceptionReport of this error. |
isEmpty | protected boolean isEmpty(String testString)(Code) | | DOCUMENT ME!
Parameters: testString - DOCUMENT ME! DOCUMENT ME! |
|
|