mirror of
https://github.com/QB64Official/qb64.git
synced 2024-08-22 11:25:08 +00:00
When Debug is set, any QB errors will now trigger a more helpful error handler
This commit is contained in:
parent
b79ca01e7e
commit
de14c256d9
1 changed files with 18 additions and 0 deletions
|
@ -12260,6 +12260,24 @@ E = 1
|
||||||
RESUME NEXT
|
RESUME NEXT
|
||||||
|
|
||||||
qberror:
|
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
|
IF ideerror THEN 'error happened inside the IDE
|
||||||
fh = FREEFILE
|
fh = FREEFILE
|
||||||
|
|
Loading…
Reference in a new issue