summaryrefslogtreecommitdiff
path: root/src/vm/clrex.h
diff options
context:
space:
mode:
authorBryan Arant <bryanar@microsoft.com>2015-08-13 13:21:22 -0700
committerBryan Arant <bryanar@microsoft.com>2015-08-13 13:21:22 -0700
commit16fc3005c085212f6e700a0df8ff7f36c1ea535b (patch)
tree824a34d837d136ba5e9100a09ff7add8c776e18e /src/vm/clrex.h
parent6b8d992844994ac5e52344dd6f2eec2074790231 (diff)
downloadcoreclr-16fc3005c085212f6e700a0df8ff7f36c1ea535b.tar.gz
coreclr-16fc3005c085212f6e700a0df8ff7f36c1ea535b.tar.bz2
coreclr-16fc3005c085212f6e700a0df8ff7f36c1ea535b.zip
There was a testcase failing (Interop\WinRT\Exception\ManagedClientNativeServer\ExceptionTest.csproj).
The test checks that the HResult 0x8000000e maps to a System.InvalidOperationException. What was happening: We returned a System.COMException with the message "A method was called at an unexpected time." (we're just constructing an exception based on an HR message). What should be happening: We return a System.InvalidOperationException (i.e. we check against the exceptionKind maps for a specific HResult to map to an exception). The point of failure is in the creation of the EEMessageException. When calling GetKindFromHR(...) we were inverting the boolean that uses the WinRT mappings. Removing that inversion allows us to check the WinRT Exception Maps for exceptions. When I made this change, we correctly return the correct Exception. Test coverage: I ran a full DDR, and the whole TOF (both against my build and against the newest build). All passed successfully (i.e. no additional failures). [tfs-changeset: 1514327]
Diffstat (limited to 'src/vm/clrex.h')
-rw-r--r--src/vm/clrex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vm/clrex.h b/src/vm/clrex.h
index cd91edb634..6e708feb7f 100644
--- a/src/vm/clrex.h
+++ b/src/vm/clrex.h
@@ -1107,7 +1107,7 @@ inline EEMessageException::EEMessageException(HRESULT hr)
}
inline EEMessageException::EEMessageException(HRESULT hr, bool fUseCOMException)
- : EEException(GetKindFromHR(hr, !fUseCOMException)),
+ : EEException(GetKindFromHR(hr, fUseCOMException)),
m_hr(hr),
m_resID(0)
{