SPMI: Throw distinguished exception for recorded exceptions (#89978)
authorJakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Mon, 7 Aug 2023 21:02:32 +0000 (23:02 +0200)
committerGitHub <noreply@github.com>
Mon, 7 Aug 2023 21:02:32 +0000 (23:02 +0200)
commit2e06200b1f31e16e2bc37ef49013803c8257a4cb
treebe75d585ba5f8e099bae0adda78246f7071ddf2e
parenta9363bf0b8844f8ce34018c3c53ebb0b3096a3dc
SPMI: Throw distinguished exception for recorded exceptions (#89978)

Switch back to this scheme, since only looking for the managed exception
code does not handle crossgen2/ilc (they throw exceptions across the
JIT-EE interface as normal C++ exceptions).

I've verified that the JIT does not look closely at the exception codes
thrown in any of the places it does EH, which comes down to
`impJitErrorTrap` and `runWithErrorTrap`. So changing the exception code
should not result in any behavior differences.
src/coreclr/tools/superpmi/superpmi-shared/errorhandling.cpp
src/coreclr/tools/superpmi/superpmi-shared/errorhandling.h
src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp
src/coreclr/tools/superpmi/superpmi/jitinstance.cpp