| java.lang.Object com.lutris.appserver.server.httpPresentation.ExceptionHandler
ExceptionHandler | class ExceptionHandler (Code) | | Various routines used in handling exceptions.
|
Method Summary | |
protected static String | getErrorHandler(String presObjPath, String requestedPresObjPath, boolean whileHandlingError, PresentationLoader loader, LogChannel logChannel, long requestId) Get the path of the error handler for an exception that occured during
the loading and execution of a presentation or the handling of an error
The handler is a presentation named `ErrorHandler' in the current or
a higher level directory.
This method just returns the path for the error handler for the
specified presentation path. | protected static void | logDisplayException(HttpPresentationComms comms, LogChannel logChannel, long requestId, Application application, Throwable except, String presObjPath) Output an HTML page describing an exception and log the exception. | protected static void | maxRedirectsReached(HttpPresentationComms comms, LogChannel logChannel, long requestId, int maxRedirectErrorLoops, Application application, String presObjPath) Generate an error for the maximum number of redirect's being
reached. | protected static void | processUnhandledException(HttpPresentationComms comms, LogChannel logChannel, long requestId, Application application, String presObjPath, Throwable except) Process an exception that has not been handled by an error handler or
so other mechanism. | protected static void | sendUnauthorizedPage(HttpPresentationComms comms, LogChannel logChannel, long requestId, Application application, String presObjPath, PageUnauthorizedException unauthExcept) Process an unauthorized page exception, sending the approriate
HTTP response. |
getErrorHandler | protected static String getErrorHandler(String presObjPath, String requestedPresObjPath, boolean whileHandlingError, PresentationLoader loader, LogChannel logChannel, long requestId)(Code) | | Get the path of the error handler for an exception that occured during
the loading and execution of a presentation or the handling of an error
The handler is a presentation named `ErrorHandler' in the current or
a higher level directory.
This method just returns the path for the error handler for the
specified presentation path. This attempts to load the error handler
just to see if it exists. This also handles errors that are throw while
handling an error (which is often just an ErrorHandler passing an error up
to a higher level).
Parameters: presObjPath - The path of the presentation object that threw the error. Thismay not be the same as the original request URL. This is relativeto presentationRoot . Parameters: requestedPresObjPath - Original presentation object that the error hander is being calledfor. Parameters: whileHandlingError - True an error was already being handled. Parameters: logChannel - Log channel to use. The path to the presentation object to invoke or null if nois available (reached top of tree). |
logDisplayException | protected static void logDisplayException(HttpPresentationComms comms, LogChannel logChannel, long requestId, Application application, Throwable except, String presObjPath)(Code) | | Output an HTML page describing an exception and log the exception.
If it looks like a client disconnect, log at the DEBUG level.
|
sendUnauthorizedPage | protected static void sendUnauthorizedPage(HttpPresentationComms comms, LogChannel logChannel, long requestId, Application application, String presObjPath, PageUnauthorizedException unauthExcept) throws HttpPresentationException, IOException(Code) | | Process an unauthorized page exception, sending the approriate
HTTP response.
Two actions are taken: a HTTP header is set telling the browser that it
needs to use basic auth authentication and which relm to ask for, and
the response code is set to 401, which means unauthorized. The response
is now ready to return to the user, no further proccessing needs to be
done on it. Most browsers will see the 401 response, and will create a
dialog box asking the user to enter a username and password. The relm
appears in this dialog, so the user knows what he or she is logging in
to. After gathering the data, most browsers will re-issue the response,
with the username and password in an HTTP header.
|
|
|