diff options
author | Steve MacLean <stmaclea@microsoft.com> | 2019-03-27 17:24:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-27 17:24:00 -0400 |
commit | 66c05cea421a9f388eaebece2b9e64ce4560c5c5 (patch) | |
tree | 4ba14774b9e34a64559f193d797b7628116b0239 /src/vm/corhost.cpp | |
parent | c3e1bd5ccc482c9a7670762676bda95ebd34707d (diff) | |
download | coreclr-66c05cea421a9f388eaebece2b9e64ce4560c5c5.tar.gz coreclr-66c05cea421a9f388eaebece2b9e64ce4560c5c5.tar.bz2 coreclr-66c05cea421a9f388eaebece2b9e64ce4560c5c5.zip |
Extend WindowsEventLog test for EntryPointFilter (#23178)
* Extend WindowsEventLog test
Verify EntryPointFilter solves logging problem with native host swallowing exceptions
WindowsEventLog only look at new entries
WindowsEventLog remove time check
Add mechanism to corhost to emulate host swallowing all exceptions
* PR feedback
Diffstat (limited to 'src/vm/corhost.cpp')
-rw-r--r-- | src/vm/corhost.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/vm/corhost.cpp b/src/vm/corhost.cpp index e02b514f5e..40d8fff2dc 100644 --- a/src/vm/corhost.cpp +++ b/src/vm/corhost.cpp @@ -460,10 +460,23 @@ HRESULT CorHost2::ExecuteAssembly(DWORD dwAppDomainId, arguments->SetAt(i, argument); } - DWORD retval = pAssembly->ExecuteMainMethod(&arguments, TRUE /* waitForOtherThreads */); - if (pReturnValue) + if(CLRConfig::GetConfigValue(CLRConfig::INTERNAL_Corhost_Swallow_Uncaught_Exceptions)) { - *pReturnValue = retval; + EX_TRY + DWORD retval = pAssembly->ExecuteMainMethod(&arguments, TRUE /* waitForOtherThreads */); + if (pReturnValue) + { + *pReturnValue = retval; + } + EX_CATCH_HRESULT (hr) + } + else + { + DWORD retval = pAssembly->ExecuteMainMethod(&arguments, TRUE /* waitForOtherThreads */); + if (pReturnValue) + { + *pReturnValue = retval; + } } GCPROTECT_END(); |