There is a per-thread exception state stored in m_handlerInfo member of current Thread. The object being thrown is in m_handlerInfo.m_pThrowable.
Passing HRESULT in ExceptionInformation is just a local exception handling contract in a few parts of the CLR codebase. It is not the usual way things work. ExceptionInformation does not carry any useful information for regular CLR exceptions. BTW: We can not pass the thrown exception object in RaiseException's ExceptionInformation even if we wanted to. The exception object has to be reported to GC for tracking. There would be not way how to report the exception object to GC if it was passed in ExceptionInformation. The exception handling is implemented on top of Win32 SEH for interoperability with unmanaged code. In Rotor, PAL adds a thin layer on top of Win32 SEH to make it portable (pal\win32\exception.c). You may also want to take a look at my notes about exception handling internals that Joel bloged a while ago: http://blogs.msdn.com/joelpob/archive/2004/03/05/84738.aspx -Jan -----Original Message----- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Keith Hill Sent: Tuesday, March 29, 2005 9:50 PM To: DOTNET-ROTOR@DISCUSS.DEVELOP.COM Subject: [DOTNET-ROTOR] Exceptions and SEH filters I assume that underneath .NET exception handling is good ol' Win32 SEH. I also assume that a "throw" in C# somewhere causes a call to RaiseException(). What I'm wondering is how the CLR's 1st pass filter function finds the exception object? From what I can see, the throw populates the ExceptionInformation array with a single value that is the HResult of the exception. Is that value used to "lookup" the corresponding exception object? -- Keith =================================== 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