summaryrefslogtreecommitdiff
path: root/src/classlibnative
diff options
context:
space:
mode:
authorSung Yoon Whang <suwhang@microsoft.com>2018-03-09 18:33:26 -0600
committerGitHub <noreply@github.com>2018-03-09 18:33:26 -0600
commitc128ba146c3190ac907aa4ee5d4067cb6ceb0742 (patch)
tree4d25da98d140a40449332c5282ce66ba7f827e4b /src/classlibnative
parent57b215fc758737f55a7062cab277154c5b9626d4 (diff)
downloadcoreclr-c128ba146c3190ac907aa4ee5d4067cb6ceb0742.tar.gz
coreclr-c128ba146c3190ac907aa4ee5d4067cb6ceb0742.tar.bz2
coreclr-c128ba146c3190ac907aa4ee5d4067cb6ceb0742.zip
Log inner exceptions for Environment.Failfast (#16622)
* Add inner exception log to failfast * cleanup * Address PR comments * Address more GC hole issue * address more PR comments
Diffstat (limited to 'src/classlibnative')
-rw-r--r--src/classlibnative/bcltype/system.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/classlibnative/bcltype/system.cpp b/src/classlibnative/bcltype/system.cpp
index 91481d7026..57a4aa12df 100644
--- a/src/classlibnative/bcltype/system.cpp
+++ b/src/classlibnative/bcltype/system.cpp
@@ -460,6 +460,14 @@ void SystemNative::GenericFailFast(STRINGREF refMesgString, EXCEPTIONREF refExce
WszOutputDebugString(W("\"\r\n"));
}
+ const WCHAR * argExceptionString = NULL;
+ StackSString msg;
+ if (gc.refExceptionForWatsonBucketing != NULL)
+ {
+ GetExceptionMessage(gc.refExceptionForWatsonBucketing, msg);
+ argExceptionString = msg.GetUnicode();
+ }
+
Thread *pThread = GetThread();
#ifndef FEATURE_PAL
@@ -490,7 +498,7 @@ void SystemNative::GenericFailFast(STRINGREF refMesgString, EXCEPTIONREF refExce
if (gc.refExceptionForWatsonBucketing != NULL)
pThread->SetLastThrownObject(gc.refExceptionForWatsonBucketing);
- EEPolicy::HandleFatalError(exitCode, retAddress, pszMessage, NULL, errorSourceString);
+ EEPolicy::HandleFatalError(exitCode, retAddress, pszMessage, NULL, errorSourceString, argExceptionString);
GCPROTECT_END();
}