Package io.datarouter.exception.service
Class DefaultExceptionRecorder
java.lang.Object
io.datarouter.exception.service.DefaultExceptionRecorder
- All Implemented Interfaces:
io.datarouter.web.exception.ExceptionRecorder
public class DefaultExceptionRecorder
extends java.lang.Object
implements io.datarouter.web.exception.ExceptionRecorder
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description DefaultExceptionRecorder() -
Method Summary
Modifier and Type Method Description io.datarouter.instrumentation.exception.ExceptionRecordDtorecordException(java.lang.Throwable exception, io.datarouter.storage.exception.ExceptionCategory category, java.lang.String location, java.lang.String methodName, java.lang.Integer lineNumber, java.lang.String callOrigin)io.datarouter.instrumentation.exception.ExceptionRecordDtorecordExceptionAndHttpRequest(java.lang.Throwable exception, java.lang.String location, java.lang.String methodName, java.lang.Integer lineNumber, javax.servlet.http.HttpServletRequest request, java.lang.String callOrigin)voidrecordHttpRequest(javax.servlet.http.HttpServletRequest request)protected voidreport(ExceptionRecord exceptionRecord, io.datarouter.storage.exception.ExceptionCategory category)java.util.Optional<io.datarouter.instrumentation.exception.ExceptionRecordDto>tryRecordException(java.lang.Throwable exception, java.lang.String callOrigin)java.util.Optional<io.datarouter.instrumentation.exception.ExceptionRecordDto>tryRecordException(java.lang.Throwable exception, java.lang.String callOrigin, io.datarouter.storage.exception.ExceptionCategory category)java.util.Optional<io.datarouter.instrumentation.exception.ExceptionRecordDto>tryRecordExceptionAndHttpRequest(java.lang.Throwable exception, java.lang.String callOrigin, javax.servlet.http.HttpServletRequest request)
-
Constructor Details
-
DefaultExceptionRecorder
public DefaultExceptionRecorder()
-
-
Method Details
-
tryRecordException
public java.util.Optional<io.datarouter.instrumentation.exception.ExceptionRecordDto> tryRecordException(java.lang.Throwable exception, java.lang.String callOrigin)- Specified by:
tryRecordExceptionin interfaceio.datarouter.web.exception.ExceptionRecorder
-
tryRecordException
public java.util.Optional<io.datarouter.instrumentation.exception.ExceptionRecordDto> tryRecordException(java.lang.Throwable exception, java.lang.String callOrigin, io.datarouter.storage.exception.ExceptionCategory category)- Specified by:
tryRecordExceptionin interfaceio.datarouter.web.exception.ExceptionRecorder
-
recordException
public io.datarouter.instrumentation.exception.ExceptionRecordDto recordException(java.lang.Throwable exception, io.datarouter.storage.exception.ExceptionCategory category, java.lang.String location, java.lang.String methodName, java.lang.Integer lineNumber, java.lang.String callOrigin)- Specified by:
recordExceptionin interfaceio.datarouter.web.exception.ExceptionRecorder
-
tryRecordExceptionAndHttpRequest
public java.util.Optional<io.datarouter.instrumentation.exception.ExceptionRecordDto> tryRecordExceptionAndHttpRequest(java.lang.Throwable exception, java.lang.String callOrigin, javax.servlet.http.HttpServletRequest request)- Specified by:
tryRecordExceptionAndHttpRequestin interfaceio.datarouter.web.exception.ExceptionRecorder
-
recordExceptionAndHttpRequest
public io.datarouter.instrumentation.exception.ExceptionRecordDto recordExceptionAndHttpRequest(java.lang.Throwable exception, java.lang.String location, java.lang.String methodName, java.lang.Integer lineNumber, javax.servlet.http.HttpServletRequest request, java.lang.String callOrigin)- Specified by:
recordExceptionAndHttpRequestin interfaceio.datarouter.web.exception.ExceptionRecorder
-
report
protected void report(ExceptionRecord exceptionRecord, io.datarouter.storage.exception.ExceptionCategory category) -
recordHttpRequest
public void recordHttpRequest(javax.servlet.http.HttpServletRequest request)- Specified by:
recordHttpRequestin interfaceio.datarouter.web.exception.ExceptionRecorder
-