Package com.yahoo.io
Class FatalErrorHandler
- java.lang.Object
-
- com.yahoo.io.FatalErrorHandler
-
public class FatalErrorHandler extends java.lang.Object
What to do if a fatal condition happens in an IO component.TODO: We need to re-think this design a bit. First off, we probably need to make the interface an abstract class or a pure interface type. Second we provide a few default implementations which are named after what policy they implement -- like SystemExitOnError etc. Also, runnables that have fatal error handling capability should probably implement a standard interface for get/set etc. Also, we should encourage application authors to provide their own, application specific error handlers rather than relying on the default.
- Author:
- Steinar Knutsen
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.logging.Logger
log
-
Constructor Summary
Constructors Constructor Description FatalErrorHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handle(java.lang.Throwable t, java.lang.Object context)
Do something reasonable when a an Error occurs.
-
-
-
Method Detail
-
handle
public void handle(java.lang.Throwable t, java.lang.Object context)
Do something reasonable when a an Error occurs. Override this to change behavior. Default behavior is to log the error, then exit.- Parameters:
t
- The Throwable causing the handler to be activated.context
- The object calling the handler.
-
-