Fixed errors when gitea not available

main
Yuriy 1 year ago
parent cfce669061
commit cf82847058

@ -8,7 +8,12 @@ CheckForUpdates(GitReleasesAPIURL){
data := URLDownloadToVar(GitReleasesAPIURL)
; Msgbox % "data: " data
parsed := JSON.Load(data)
try, parsed := JSON.Load(data)
catch e {
Message = Failed to check for updates. Gitea Releases API returned blank or malformed data.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
Return
}
UpdateVersionNumber := parsed.1.name
@ -36,7 +41,12 @@ CheckForUpdates(GitReleasesAPIURL){
UpdateScript(){
data := URLDownloadToVar(GitReleasesAPIURL)
parsed := JSON.Load(data)
try parsed := JSON.Load(data)
catch e {
Message = Failed to check for updates. Gitea Releases API returned blank or malformed data.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
Return
}
UpdateVersionNumber := parsed.1.name
ChangeLog := parsed.1.body

Loading…
Cancel
Save