From de14c256d989d81f98fc6218db3ea1087704bcfa Mon Sep 17 00:00:00 2001 From: Luke Ceddia Date: Fri, 12 Aug 2016 11:59:11 +1000 Subject: [PATCH] When Debug is set, any QB errors will now trigger a more helpful error handler --- source/qb64.bas | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/source/qb64.bas b/source/qb64.bas index f3c4a338b..9be07c9cc 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -12260,6 +12260,24 @@ E = 1 RESUME NEXT qberror: +IF Debug THEN 'A more in-your-face error handler + _AUTODISPLAY + SCREEN _NEWIMAGE(80, 25, 0), , 0, 0 + COLOR 7, 0 + _CONTROLCHR OFF + PRINT "A QB error has occurred (and you have compiled in debugging support)." + PRINT "Some key information:" + PRINT "Error"; ERR + PRINT "Line"; _ERRORLINE + IF _INCLERRORLINE THEN + PRINT "Included line"; _INCLERRORLINE + PRINT "Included file "; _INCLERRORFILE$ + END IF + PRINT "ideerror ="; ideerror; "qberrorhappened ="; qberrorhappened; "qberrorhappenedvalue ="; qberrorhappenedvalue; "linenumber ="; linenumber + PRINT "ca$ = {"; ca$; "}, idecommand$ = {"; idecommand$; "}" + PRINT "linefragment = {"; linefragment; "}" + END +END IF IF ideerror THEN 'error happened inside the IDE fh = FREEFILE