Sérgio Rodelo [mailto:[EMAIL PROTECTED]] wrote:
> I am using it inside my code. What I need is to get an > exception that might have ocurred elsewhere else in the code. > > For example I have lots of classes that I use to perform > specific tasks. Each of them handles their errors with try > Catch blocks. It can't/doesn't do this. The exception has to propagate up past the handler (page) in order for the HttpContext to trap it. Then the next handler that is executed in the context has access to that exception via HttpContext::Error or HttpServerUtility::GetLastError. > But further up in the calling chain, I need to know the > errors that might have ocurred in one of these calls. And I > dont want to be returning Exceptions from all the methods of > all the classes I call. > > How should I do this ? If you're catching the exceptions and not rethrowing them then there's no way callers higher up in the chain can know that an exception has occurred unless your components that capture the exceptions write to an trace or event log or do something like trigger a WMI event. > Can't I find out any where in my code about all the errors > that ocurred during the processing of a specific page ? Only if you are propagating all exceptions out of the components to the page itself. HTH, Drew You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.