From 7fe1a58a8e81bbcd883ca924900ac876bd18e951 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Wed, 11 Nov 2020 22:28:45 +0100 Subject: [PATCH] Fix integer instead of string message part. Closes #1215 --- source/apphelpers.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/apphelpers.pas b/source/apphelpers.pas index e3203f96..59d3d235 100644 --- a/source/apphelpers.pas +++ b/source/apphelpers.pas @@ -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