The error functions trap and process errors. You can use these functions to check the status of any other function.