Add new error handling functions.