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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addInterceptor
(@NotNull FatalErrorReporter.Interceptor interceptor) final void
final void
final void
reportAsync
(@NotNull String message) final void
reportAsync
(@NotNull String message, @NotNull Throwable throwable) protected abstract void
reportImpl
(@NotNull String message, @NotNull Throwable throwable, boolean isFromUncaught) Report a fatal error in an implementation specific way.final void
uncaughtException
(@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:
report
in interfaceFatalErrorReporter
-
report
- Specified by:
report
in interfaceFatalErrorReporter
-
reportAsync
public final void reportAsync(@NotNull @NotNull String message, @NotNull @NotNull Throwable throwable) - Specified by:
reportAsync
in interfaceFatalErrorReporter
-
reportAsync
- Specified by:
reportAsync
in interfaceFatalErrorReporter
-
uncaughtException
public final void uncaughtException(@NotNull @NotNull Thread thread, @NotNull @NotNull Throwable throwable) - Specified by:
uncaughtException
in interfaceThread.UncaughtExceptionHandler
-
addInterceptor
- Specified by:
addInterceptor
in interfaceFatalErrorReporter
-