Alex The best way I found to implement this into an application framework is to write a error logging class in it's own assembly (middle tier) that logs to db, file system, or event log. The assembly should also include a method to format your error message for logging.
Then in each UI layer, write you error handling code (as global error catching differs from web to windows), and call your logging class from there. Hope this helps. Regards Doug Wilson Applications Integration - IT Dept -----Original Message----- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Alexandre Rocco Sent: 19 February 2005 05:09 PM To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM Subject: [ADVANCED-DOTNET] Exception Handling I have a somewhat good understanding of exceptions on the .net framework and how they work and bubble up through applications. One doubt I came up these days was where should I put the exception handling code to log the errors/information in the application. I searched a bit on the net and found some info regarding this, but seems to me that this rule is directly connected to the architecture of the app. In my particular case, I have an application consisted of a DAL (data access layer) and a BLL (business logic layer) and then 3 different apps that consumes this "API". From what I have learned reading some articles, I should put exception handling code on the application that uses this API. But since I have 3 of them, I think it may be duplicated work. Another approach could be handle the exceptions on the API and then rethrow the exception up, so the client code can react accordingly. Any suggestions or thougts on that? Any pointers would be appreciated. Thanks, Alexandre Rocco =================================== This list is hosted by DevelopMentor(r) http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com