Implements ErrorHandler.
Constructor
new Markuprequest(requestParams, requestBody, response)
Parameters
Name | Type | Description |
---|---|---|
requestParams | RequestParams | |
requestBody | Readable | |
response | Markupresponse |
Property Index
Name | Description |
---|---|
running_as_errorhandler | Flag set by caller (middleware) if markuprequest should populate the STATUS system-specific entity from the initial value of req. |
running_as_middleware | Flag set by caller (middleware) if markuprequest should throw an exception (if true) or invoke `socket. |
Method Index
Name | Description |
---|---|
abort_request | Called on errors during rendering an error page, when an SGML error occured during rendering a request page's content (eg. |
process | Main entry point for request processing. |
process_error_response | Called to render an HTTP error response/page where this. |
process_script_name | Performs request processing on `requestParams. |
reset | Resets/dealloc constructed processing components. |
startContent | Called by chain/tokenizer when prolog parsing has completed. |
Member Details
- abort_request()
-
Called on errors during rendering an error page, when an SGML error occured during rendering a request page's content (eg. as opposed to prolog processing in which case a proper HTTP status and error page rendering cycle is (attempted to be) produced first.
- process()
-
Main entry point for request processing.
Takes URL/parameters to service from request parameters map.
- process_error_response()
-
Called to render an HTTP error response/page where this.response.status is expected to have been set to a non-200 status previously.
- process_script_name()
-
Performs request processing on
requestParams.scriptName
as template andrequestParams.pathTranslated
as client document.Called from
process_sgml()
after re-determiningscriptName
/pathTranslated
from initial value ofscriptName
. Can also be called directly from outside (ie. when host web container provides SGML files viascriptName
).
- reset()
-
Resets/dealloc constructed processing components.
Cf. platformbaseentitymanager.reset().
- running_as_errorhandler
-
Flag set by caller (middleware) if markuprequest should populate the STATUS system-specific entity from the initial value of req.statusCode.
- running_as_middleware
-
Flag set by caller (middleware) if markuprequest should throw an exception (if true) or invoke
socket.destroy()
(if false) when handling errors (such as during rendering error pages).
- startContent()
-
Called by chain/tokenizer when prolog parsing has completed.
Evaluates parameters parsed from HTTP/HTTP2 simple link process declaration and sets response headers accordingly.
Returns
non-falsey (relevant only for async) return indicates to the caller to return immediately in turn (roll-up call stack); falsey/undefined return indicates caller can continue b/c no async I/O has been kicked from here