Fix integer instead of string message part. Closes #1215

This commit is contained in:
Ansgar Becker
2020-11-11 22:28:45 +01:00
parent bae514d147
commit 7fe1a58a8e

View File

@@ -3333,11 +3333,11 @@ begin
if (not Assigned(UrlHandle)) and FURL.StartsWith('https:', true) then begin
// Try again without SSL. See issue #65 and #1209
InsecureUrl := ReplaceRegExpr('^https:', FURL, 'http:');
MainForm.LogSQL(f_('Could not open %s (%s) - trying again without SSL...', [FURL, GetLastError]), lcError);
MainForm.LogSQL(f_('Could not open %s (%s) - trying again without SSL...', [FURL, SysErrorMessage(Windows.GetLastError)]), lcError);
UrlHandle := InternetOpenURL(NetHandle, PChar(InsecureUrl), nil, 0, INTERNET_FLAG_RELOAD, 0);
end;
if not Assigned(UrlHandle) then begin
raise Exception.CreateFmt(_('Could not open %s (%s)'), [FURL, GetLastError]);
raise Exception.CreateFmt(_('Could not open %s (%s)'), [FURL, SysErrorMessage(Windows.GetLastError)]);
end;
// Detect content length