Reputation: 34208
Suppose that when we develop a webservice or a remoting layer as the middle tier - how could I handle an exception in a very structured way, such that the exception message can be captured from its calling environment?
Also, how can errors or exceptions be handled in structured way in the case of a class library, i.e., when we develop our dll file as a class library?
Please guide me in detail and, if it would be possible, post some short code for better visualization.
Thanks.
Upvotes: 0
Views: 441
Reputation: 6295
I strongly recommend looking at the Microsoft Enterprise Library's Exception Handling block: http://msdn.microsoft.com/en-us/library/ff664698%28v=PandP.50%29.aspx. You can find extensive samples (here, for example), and a decently sized community of developers who are familiar with it.
HTH.
Upvotes: 1