mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-28 11:17:46 +00:00
Puts _ERRORMESSAGE$ to good use.
This commit is contained in:
parent
30a90590f4
commit
6a134929a9
2 changed files with 7 additions and 3 deletions
|
@ -143,7 +143,7 @@ FUNCTION ide2 (ignore)
|
||||||
'report any IDE errors which have occurred
|
'report any IDE errors which have occurred
|
||||||
IF ideerror THEN
|
IF ideerror THEN
|
||||||
mustdisplay = 1
|
mustdisplay = 1
|
||||||
IF ideerror = 1 THEN errorat$ = "IDE module error"
|
IF ideerror = 1 THEN errorat$ = _ERRORMESSAGE$
|
||||||
IF ideerror = 2 THEN errorat$ = "File not found"
|
IF ideerror = 2 THEN errorat$ = "File not found"
|
||||||
IF ideerror = 3 THEN errorat$ = "File access error": CLOSE #150
|
IF ideerror = 3 THEN errorat$ = "File access error": CLOSE #150
|
||||||
IF ideerror = 4 THEN errorat$ = "Path not found"
|
IF ideerror = 4 THEN errorat$ = "Path not found"
|
||||||
|
|
|
@ -1101,7 +1101,7 @@ ideerror:
|
||||||
IF INSTR(idemessage$, sp$) THEN
|
IF INSTR(idemessage$, sp$) THEN
|
||||||
'Something went wrong here, so let's give a generic error message to the user.
|
'Something went wrong here, so let's give a generic error message to the user.
|
||||||
'(No error message should contain sp$ - that is, CHR$(13), when not in Debug mode)
|
'(No error message should contain sp$ - that is, CHR$(13), when not in Debug mode)
|
||||||
idemessage$ = "Compiler error (check for syntax errors) (Reference:"
|
idemessage$ = "Compiler error (check for syntax errors) (" + _ERRORMESSAGE$ + ":"
|
||||||
IF ERR THEN idemessage$ = idemessage$ + str2$(ERR) + "-"
|
IF ERR THEN idemessage$ = idemessage$ + str2$(ERR) + "-"
|
||||||
IF _ERRORLINE THEN idemessage$ = idemessage$ + str2$(_ERRORLINE)
|
IF _ERRORLINE THEN idemessage$ = idemessage$ + str2$(_ERRORLINE)
|
||||||
IF _INCLERRORLINE THEN idemessage$ = idemessage$ + "-" + _INCLERRORFILE$ + "-" + str2$(_INCLERRORLINE)
|
IF _INCLERRORLINE THEN idemessage$ = idemessage$ + "-" + _INCLERRORFILE$ + "-" + str2$(_INCLERRORLINE)
|
||||||
|
@ -12474,6 +12474,7 @@ IF Debug THEN 'A more in-your-face error handler
|
||||||
PRINT "A QB error has occurred (and you have compiled in debugging support)."
|
PRINT "A QB error has occurred (and you have compiled in debugging support)."
|
||||||
PRINT "Some key information (qb64.bas):"
|
PRINT "Some key information (qb64.bas):"
|
||||||
PRINT "Error"; ERR
|
PRINT "Error"; ERR
|
||||||
|
PRINT "Description: "; _ERRORMESSAGE$
|
||||||
PRINT "Line"; _ERRORLINE
|
PRINT "Line"; _ERRORLINE
|
||||||
IF _INCLERRORLINE THEN
|
IF _INCLERRORLINE THEN
|
||||||
PRINT "Included line"; _INCLERRORLINE
|
PRINT "Included line"; _INCLERRORLINE
|
||||||
|
@ -12491,7 +12492,10 @@ IF ideerror THEN 'error happened inside the IDE
|
||||||
fh = FREEFILE
|
fh = FREEFILE
|
||||||
OPEN "internal\temp\ideerror.txt" FOR OUTPUT AS #fh
|
OPEN "internal\temp\ideerror.txt" FOR OUTPUT AS #fh
|
||||||
PRINT #fh, ERR
|
PRINT #fh, ERR
|
||||||
|
PRINT #fh, _ERRORMESSAGE$
|
||||||
PRINT #fh, _ERRORLINE
|
PRINT #fh, _ERRORLINE
|
||||||
|
PRINT #fh, _INCLERRORLINE
|
||||||
|
PRINT #fh, _INCLERRORFILE$
|
||||||
CLOSE #fh
|
CLOSE #fh
|
||||||
sendc$ = CHR$(255) 'a runtime error has occurred
|
sendc$ = CHR$(255) 'a runtime error has occurred
|
||||||
RESUME sendcommand 'allow IDE to handle error recovery
|
RESUME sendcommand 'allow IDE to handle error recovery
|
||||||
|
@ -12507,7 +12511,7 @@ IF Debug THEN PRINT #9, "ERL="; ERL
|
||||||
IF idemode AND qberrorhappenedvalue >= 0 THEN
|
IF idemode AND qberrorhappenedvalue >= 0 THEN
|
||||||
'real qb error occurred
|
'real qb error occurred
|
||||||
ideerrorline = linenumber
|
ideerrorline = linenumber
|
||||||
idemessage$ = "Compiler error (check for syntax errors) (Reference:"
|
idemessage$ = "Compiler error (check for syntax errors) (" _ERRORMESSAGE$ + ":"
|
||||||
IF ERR THEN idemessage$ = idemessage$ + str2$(ERR) + "-"
|
IF ERR THEN idemessage$ = idemessage$ + str2$(ERR) + "-"
|
||||||
IF _ERRORLINE THEN idemessage$ = idemessage$ + str2$(_ERRORLINE)
|
IF _ERRORLINE THEN idemessage$ = idemessage$ + str2$(_ERRORLINE)
|
||||||
IF _INCLERRORLINE THEN idemessage$ = idemessage$ + "-" + _INCLERRORFILE$ + "-" + str2$(_INCLERRORLINE)
|
IF _INCLERRORLINE THEN idemessage$ = idemessage$ + "-" + _INCLERRORFILE$ + "-" + str2$(_INCLERRORLINE)
|
||||||
|
|
Loading…
Reference in a new issue