I've been working on a few different projects - all of them I have handled errors in different ways. I am always unsure of myself when it comes to this - I never really know when I should let stuff fail - when I should print to log files - when I should return something indicating - when I should use error states - etc
I know its pretty common to let stuff that should break your code break it - so that there is a fixable crash - but I often find that when I do this I am allowing things that shouldn't break my code break it... like an assert(pointer != NULL) will result in a crash when some allowable condition is creating a NULL pointer.. Just some condition I didn't think about when I originally wrote the code
Anyways - you guys have any methodology to this - any things that you have found that work best for you for error handling in general? Any important remarks on logging? What level do you do the error checking and at what level do you handle it? Does anyone ever use standard exceptions?