re-implement the error handling architecture.