Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
637 B

  1. // ASSERT.cpp -- Assertion support code
  2. #include "StdAfx.h"
  3. #ifdef _DEBUG
  4. void STDCALL RonM_AssertionFailure(PSZ pszFileName, int nLine)
  5. {
  6. char abMessage[513];
  7. wsprintf(abMessage, "Assertion Failure on line %d of %s!", nLine, pszFileName);
  8. int iResult= ::MessageBox(NULL, abMessage, "Assertion Failure!",
  9. MB_ABORTRETRYIGNORE | MB_APPLMODAL | MB_ICONSTOP
  10. );
  11. switch(iResult)
  12. {
  13. case IDABORT:
  14. ExitProcess(-nLine);
  15. case IDRETRY:
  16. DebugBreak();
  17. break;
  18. case IDIGNORE:
  19. break;
  20. }
  21. }
  22. #endif // _DEBUG