From e28f3349df80fee434100099abc811769292623d Mon Sep 17 00:00:00 2001 From: ronny Date: Thu, 5 Oct 2000 10:27:32 +0000 Subject: Added assertion alert box for Windows git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@252 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- backendC/CleanCompilerSources/backendsupport.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'backendC') diff --git a/backendC/CleanCompilerSources/backendsupport.c b/backendC/CleanCompilerSources/backendsupport.c index 55975b4..fe2f3d7 100644 --- a/backendC/CleanCompilerSources/backendsupport.c +++ b/backendC/CleanCompilerSources/backendsupport.c @@ -17,10 +17,21 @@ void AssertionFailed (char *conditionString, char *file, int line) -{ +{ FPrintF (StdError, "Error in backend: File %s, Line %d (%s)\n", file, line, conditionString); +# ifdef _WINDOWS_ + { + static char error[200]; + + sprintf (error, "Error in backend: File %s, Line %d (%s)\nDebug ?", file, line, conditionString); + + if (MessageBox (NULL,error,"AssertionFailed",MB_YESNO)==IDYES) + Debugger (); + } +#else Debugger (); +#endif } /* AssertionFailed */ /* -- cgit v1.2.3