How do you manage errors in your application?
I've got a larger implementation that I'm about to do. So I'm thinking about this again.
Typically I've written the error handling for each function or class at that level of abstraction. Naturally that means all the error handling is embedded throughout the application. If I need to maintain it, I need to locate what code is generating the error. That makes sense in some ways, but I'm wondering if a utility class that handles ALL error messaging for the application makes more sense or is more formal for a larger app. Opinions?
Do you write your error handling into each function? An error manager in each module? Centralized in one class for the entire app?
What do you think about it? Easy to build? Hard to maintain?