Add abort and error functions.