Skip to content

Commit 24bada7

Browse files
committed
Fix HResult
1 parent 434fff6 commit 24bada7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/coreclr/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ private static void OAFailed(int hr)
117117
throw new OutOfMemoryException();
118118
case unchecked((int)0x80020008): // DISP_E_BADVARTYPE
119119
throw new NotSupportedException(SR.NotSupported_OleAutBadVarType);
120-
case HResults.COR_E_DIVIDEBYZERO:
120+
case unchecked((int)0x80020012): // DISP_E_DIVBYZERO
121121
throw new DivideByZeroException();
122-
case HResults.COR_E_OVERFLOW:
122+
case unchecked((int)0x8002000A): // DISP_E_OVERFLOW
123123
throw new OverflowException();
124-
case HResults.TYPE_E_TYPEMISMATCH:
124+
case unchecked((int)0x80020005): // DISP_E_TYPEMISMATCH
125125
throw new InvalidCastException(SR.InvalidCast_OATypeMismatch);
126126
case HResults.E_INVALIDARG:
127127
throw new ArgumentException();

0 commit comments

Comments
 (0)