ccs.http
Interface ExceptionHelper


public interface ExceptionHelper

A helper interface which facilitates a unified exception-handling framework for all Jetty-using HTTP servers.

See Also:
ExceptionHandler

Method Summary
 java.lang.Throwable defaultException(org.mortbay.http.HttpRequest ha, org.mortbay.http.HttpResponse hq)
          Return the default exception to throw if no specific exception is set.
 SwappingBuffer transformException(SwappingBuffer cxtdoc)
          Tranform the supplied CXT document, containing the exception definition, into an HTML page to give to the user.
 

Method Detail

defaultException

java.lang.Throwable defaultException(org.mortbay.http.HttpRequest ha,
                                     org.mortbay.http.HttpResponse hq)
Return the default exception to throw if no specific exception is set. Typically this happens when a request isn't intercepted by any handler in the chain; eg. if the request is malformed and no handler can make sense of it.


transformException

SwappingBuffer transformException(SwappingBuffer cxtdoc)
                                  throws java.io.IOException
Tranform the supplied CXT document, containing the exception definition, into an HTML page to give to the user.

Returns:
The HTML page.
Throws:
java.io.IOException - if the transform goes wrong. If this happens a plainer default page is used; not pretty, but it works.