mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-03 07:41:21 +00:00
Adds commit number, if available, to error reports.
This commit is contained in:
parent
be3aa9e9a7
commit
796974c04d
|
@ -1,14 +1,14 @@
|
|||
DIM SHARED Version AS STRING
|
||||
DIM SHARED BuildNum AS STRING
|
||||
DIM SHARED DevChannel AS STRING
|
||||
DIM SHARED AutoBuildMsg AS STRING
|
||||
|
||||
Version$ = "1.5"
|
||||
BuildNum$ = "(development build)"
|
||||
DevChannel$ = "(development build)"
|
||||
IF _FILEEXISTS("internal/version.txt") THEN
|
||||
versionfile = FREEFILE
|
||||
OPEN "internal/version.txt" FOR INPUT AS #versionfile
|
||||
LINE INPUT #versionfile, AutoBuildMsg
|
||||
AutoBuildMsg = _TRIM$(AutoBuildMsg)
|
||||
AutoBuildMsg = LEFT$(_TRIM$(AutoBuildMsg), 16) 'From git 1234567
|
||||
IF LEFT$(AutoBuildMsg, 9) <> "From git " THEN AutoBuildMsg = ""
|
||||
CLOSE #versionfile
|
||||
END IF
|
||||
|
|
|
@ -144,7 +144,7 @@ FUNCTION ide2 (ignore)
|
|||
'report any IDE errors which have occurred
|
||||
IF ideerror THEN
|
||||
mustdisplay = 1
|
||||
IF ideerror = 1 THEN errorat$ = _ERRORMESSAGE$
|
||||
IF ideerror = 1 THEN errorat$ = "Internal IDE error"
|
||||
IF ideerror = 2 THEN errorat$ = "File not found"
|
||||
IF ideerror = 3 THEN errorat$ = "File access error": CLOSE #150
|
||||
IF ideerror = 4 THEN errorat$ = "Path not found"
|
||||
|
@ -161,7 +161,9 @@ FUNCTION ide2 (ignore)
|
|||
|
||||
IF (ideerror > 1) THEN
|
||||
'Don't show too much detail if user just tried loading an invalid file
|
||||
ideerrormessageTITLE$ = ideerrormessageTITLE$ + " (" + str2$(_ERRORLINE) + "-" + str2$(_INCLERRORLINE) + ")"
|
||||
ideerrormessageTITLE$ = ideerrormessageTITLE$ + " (" + str2$(_ERRORLINE) + "-" + str2$(_INCLERRORLINE)
|
||||
IF LEN(AutoBuildMsg$) THEN ideerrormessageTITLE$ = ideerrormessageTITLE$ + "-" + MID$(AutoBuildMsg$, 10)
|
||||
ideerrormessageTITLE$ = ideerrormessageTITLE$ + ")"
|
||||
IF AttemptToLoadRecent = -1 THEN
|
||||
'Offer to cleanup recent file list, removing invalid entries
|
||||
PCOPY 2, 0
|
||||
|
@ -178,9 +180,9 @@ FUNCTION ide2 (ignore)
|
|||
IF inclerrorline THEN
|
||||
errorat$ = errorat$ + CHR$(10) + " " + CHR$(10) + "(module: " + _
|
||||
RemoveFileExtension$(LEFT$(_INCLERRORFILE$, 60))
|
||||
errorat$ = errorat$ + ", on line: " + str2$(inclerrorline) + ")"
|
||||
errorat$ = errorat$ + ", on line: " + str2$(inclerrorline) + ", " + MID$(AutoBuildMsg$, 10) + ")"
|
||||
ELSE
|
||||
errorat$ = errorat$ + CHR$(10) + " " + CHR$(10) + "(on line: " + str2$(_ERRORLINE) + ")"
|
||||
errorat$ = errorat$ + CHR$(10) + " " + CHR$(10) + "(on line: " + str2$(_ERRORLINE) + ", " + MID$(AutoBuildMsg$, 10) + ")"
|
||||
END IF
|
||||
END IF
|
||||
|
||||
|
@ -4920,7 +4922,7 @@ FUNCTION ide2 (ignore)
|
|||
IF menu$(m, s) = "#About..." THEN
|
||||
helpabout:
|
||||
PCOPY 2, 0
|
||||
m$ = "QB64 Version " + Version$ + CHR$(10) + BuildNum$
|
||||
m$ = "QB64 Version " + Version$ + CHR$(10) + DevChannel$
|
||||
IF LEN(AutoBuildMsg$) THEN m$ = m$ + CHR$(10) + AutoBuildMsg$
|
||||
result = idemessagebox("About", m$, "")
|
||||
PCOPY 3, 0: SCREEN , , 3, 0
|
||||
|
|
Loading…
Reference in a new issue