public class JsonErrorReportValve extends ErrorReportValve
Implementation of a Valve that outputs error jsons.
This Valve should be attached at the Host level, although it will work if attached to a Context.
Lifecycle.SingleUse
asyncSupported, container, containerLog, next, sm
mserver
AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
Constructor and Description |
---|
JsonErrorReportValve() |
Modifier and Type | Method and Description |
---|---|
protected void |
report(Request request,
Response response,
Throwable throwable)
Prints out an error report.
|
getPartialServletStackTrace, getProperty, invoke, isShowReport, isShowServerInfo, setProperty, setShowReport, setShowServerInfo
backgroundProcess, getContainer, getDomainInternal, getNext, getObjectNameKeyProperties, initInternal, isAsyncSupported, setAsyncSupported, setContainer, setNext, startInternal, stopInternal, toString
destroyInternal, getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister, unregister
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stop
protected void report(Request request, Response response, Throwable throwable)
ErrorReportValve
report
in class ErrorReportValve
request
- The request being processedresponse
- The response being generatedthrowable
- The exception that occurred (which possibly wraps
a root cause exceptionCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.