Heya
I have a WPF gui that has an instance of a class called Manager, which essentially manages certain communication and data functions.
I have try/catch blocks in my Manager, but I would like to know the best practice to communicate this to the gui.
For example, clicking a button generates an onClick event, and in that code I would call Manager.DoProcessing(). Trouble is, how do I know if DoProcessing bombed out? I dont want to surround the function call with another try catch...
Would it be sufficient to return my own ErrorType enum which identifies the error:
enum ErrorType { NoError, TimeOut, DBCorrupt }
etc. Or is this simplistic? It should be added that the calls to Manager will be threaded with a BackgroundWorker...