Error handling in an embedded environment


Bill Hamilton
12-01-2005, 01:34 PM
I would like to use several NR functions in an embedded environment. nrerror, with its printf(message) and exit approach, is not very friendly in embedded environments. I don't have to recover from errors (in the sense that I don't have to provide an approximate solution), but I'd like to be able to log where the error occurred and exit gracefully with an error code that lets the calling function know it should not trust the result. Has anyone done this sort of thing?