Add an error log to determine where to throw BadImageFormatException
[platform/upstream/coreclr.git] / src / vm / clrex.cpp
index 930ac5d..a67dbef 100644 (file)
@@ -1837,7 +1837,10 @@ RuntimeExceptionKind EEFileLoadException::GetFileLoadKind(HRESULT hr)
             (hr == COR_E_LOADING_REFERENCE_ASSEMBLY) ||
             (hr == META_E_BAD_SIGNATURE) || 
             (hr == COR_E_LOADING_WINMD_REFERENCE_ASSEMBLY))
+        {
+            fprintf(stderr, "@@[SR] %s:%d, exception number(%ld)\n", __FILE__, __LINE__, hr);
             return kBadImageFormatException;
+        }
         else 
         {
             if ((hr == E_OUTOFMEMORY) || (hr == NTE_NO_MEMORY))