From 117f12e4d4b87a9814e8c763c232aa4470efeab0 Mon Sep 17 00:00:00 2001 From: SteveMcNeill Date: Fri, 4 Mar 2016 11:21:16 -0500 Subject: [PATCH] Patch to correct IDE error messages IDE error messages would give invalid reports if the program encountered an error on the automatically included QB64 virtual keyboard files. This should correct that and have the IDE reporting the proper messages once again. --- source/qb64.bas | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/qb64.bas b/source/qb64.bas index 5b6121ba4..4f9be3734 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -12074,7 +12074,13 @@ END errmes: 'set a$ to message IF Error_Happened THEN a$ = Error_Message: Error_Happened = 0 layout$ = "": layoutok = 0 'invalidate layout -IF inclevel > 0 THEN a$ = a$ + incerror$ + +IF forceIncludingFile THEN 'If we're to the point where we're adding the automatic QB64 includes, we don't need to report the $INCLUDE information + IF INSTR(a$, "END SUB/FUNCTION before") THEN a$ = "SUB without END SUB" 'Just a simple rewrite of the error message to be less confusing for SUB/FUNCTIONs +ELSE 'We want to let the user know which module the error occurred in + IF inclevel > 0 THEN a$ = a$ + incerror$ +END IF + IF idemode THEN ideerrorline = linenumber idemessage$ = a$