Package io.deephaven.util.process
Class FatalErrorReporterBase
java.lang.Object
io.deephaven.util.process.FatalErrorReporterBase
- All Implemented Interfaces:
FatalErrorReporter,Thread.UncaughtExceptionHandler
- Direct Known Subclasses:
DefaultFatalErrorReporter
Tool for centralizing error reports that should result in process termination.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.util.process.FatalErrorReporter
FatalErrorReporter.Interceptor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInterceptor(@NotNull FatalErrorReporter.Interceptor interceptor) final voidfinal voidfinal voidreportAsync(@NotNull String message) final voidreportAsync(@NotNull String message, @NotNull Throwable throwable) protected abstract voidreportImpl(@NotNull String message, @NotNull Throwable throwable, boolean isFromUncaught) Report a fatal error in an implementation specific way.final voiduncaughtException(@NotNull Thread thread, @NotNull Throwable throwable)
-
Constructor Details
-
FatalErrorReporterBase
public FatalErrorReporterBase()
-
-
Method Details
-
reportImpl
protected abstract void reportImpl(@NotNull @NotNull String message, @NotNull @NotNull Throwable throwable, boolean isFromUncaught) Report a fatal error in an implementation specific way. Implementations should invoke appropriate shutdown tasks and initiate process shutdown (e.g. viaSystem.exit(int)).- Parameters:
message- the messagethrowable- the throwableisFromUncaught- true iff called fromThread.UncaughtExceptionHandler.uncaughtException(Thread, Throwable).
-
report
- Specified by:
reportin interfaceFatalErrorReporter
-
report
- Specified by:
reportin interfaceFatalErrorReporter
-
reportAsync
public final void reportAsync(@NotNull @NotNull String message, @NotNull @NotNull Throwable throwable) - Specified by:
reportAsyncin interfaceFatalErrorReporter
-
reportAsync
- Specified by:
reportAsyncin interfaceFatalErrorReporter
-
uncaughtException
public final void uncaughtException(@NotNull @NotNull Thread thread, @NotNull @NotNull Throwable throwable) - Specified by:
uncaughtExceptionin interfaceThread.UncaughtExceptionHandler
-
addInterceptor
- Specified by:
addInterceptorin interfaceFatalErrorReporter
-