Simple and robust error handling functions.