int result = IDRETRY;
- if (NoGuiOnAssert())
- {
- return FailTerminate;
- }
-
struct _gc {
STRINGREF strCondition;
STRINGREF strMessage;
windowTitle.Set(W("Assert Failure"));
}
- // We're taking a string from managed code, and we can't be sure it doesn't have stuff like %s or \n in it.
- // So, pass a format string of %s and pass the text as a vararg to our message box method.
- // Also, varargs and StackSString don't mix. Convert to string first.
- const WCHAR* msgTextAsUnicode = msgText.GetUnicode();
- result = EEMessageBoxNonLocalizedNonFatal(W("%s"), windowTitle, stackTraceText, MB_ABORTRETRYIGNORE | MB_ICONEXCLAMATION, msgTextAsUnicode);
-
- // map the user's choice to the values recognized by
- // the System.Diagnostics.Assert package
- if (result == IDRETRY)
- {
- result = FailDebug;
- }
- else if (result == IDIGNORE)
+ if (NoGuiOnAssert())
{
- result = FailIgnore;
+ fwprintf(stderr, W("%s\n%s\n%s\n"), windowTitle.GetUnicode(), msgText.GetUnicode(), stackTraceText.GetUnicode());
+ result = FailTerminate;
}
else
{
- result = FailTerminate;
+ // We're taking a string from managed code, and we can't be sure it doesn't have stuff like %s or \n in it.
+ // So, pass a format string of %s and pass the text as a vararg to our message box method.
+ // Also, varargs and StackSString don't mix. Convert to string first.
+ const WCHAR* msgTextAsUnicode = msgText.GetUnicode();
+ result = EEMessageBoxNonLocalizedNonFatal(W("%s"), windowTitle, stackTraceText, MB_ABORTRETRYIGNORE | MB_ICONEXCLAMATION, msgTextAsUnicode);
+
+ // map the user's choice to the values recognized by
+ // the System.Diagnostics.Assert package
+ if (result == IDRETRY)
+ {
+ result = FailDebug;
+ }
+ else if (result == IDIGNORE)
+ {
+ result = FailIgnore;
+ }
+ else
+ {
+ result = FailTerminate;
+ }
}
HELPER_METHOD_FRAME_END();