Basic framework for failure handling.