Package io.camunda.zeebe.util.error
Interface FatalErrorHandler
- All Known Implementing Classes:
VirtualMachineErrorHandler
public interface FatalErrorHandler
FatalErrorHandler can be used to handle all
Throwables safely and consistently.
Implementations interpret a throwable and take some action when the throwable is
considered fatal.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidHandles arbitraryThrowables.uncaughtExceptionHandler(org.slf4j.Logger logger) Builds aFatalErrorHandlerthat can be used as the default uncaught exception handlerstatic FatalErrorHandlerwithLogger(org.slf4j.Logger logger) Builds the defaultFatalErrorHandler
-
Method Details
-
handleError
Handles arbitraryThrowables. Use this method whenever catching aThrowable, before carrying on with your regular error handling.VirtualMachineErrorHandlerwill exit on allVirtualMachineErrors- Parameters:
e- the throwable
-
uncaughtExceptionHandler
Builds aFatalErrorHandlerthat can be used as the default uncaught exception handler -
withLogger
Builds the defaultFatalErrorHandler
-