1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-31 17:02:12 +03:00

Use consistent format for reporting GetLastError()

Use something like "error code %lu" for reporting GetLastError()
values on Windows.  Previously, a mix of different wordings and
formats were in use.
This commit is contained in:
Peter Eisentraut
2011-08-23 22:00:52 +03:00
parent 6c6a415333
commit 1af55e2751
18 changed files with 132 additions and 132 deletions

View File

@@ -559,7 +559,7 @@ strftime_win32(char *dst, size_t dstlen, const wchar_t *format, const struct tm
len = WideCharToMultiByte(CP_UTF8, 0, wbuf, len, dst, dstlen, NULL, NULL);
if (len == 0)
elog(ERROR,
"could not convert string to UTF-8:error %lu", GetLastError());
"could not convert string to UTF-8: error code %lu", GetLastError());
dst[len] = '\0';
if (encoding != PG_UTF8)

View File

@@ -1355,7 +1355,7 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid)
(LPWSTR) a1p, a1len / 2);
if (!r)
ereport(ERROR,
(errmsg("could not convert string to UTF-16: error %lu",
(errmsg("could not convert string to UTF-16: error code %lu",
GetLastError())));
}
((LPWSTR) a1p)[r] = 0;
@@ -1368,7 +1368,7 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid)
(LPWSTR) a2p, a2len / 2);
if (!r)
ereport(ERROR,
(errmsg("could not convert string to UTF-16: error %lu",
(errmsg("could not convert string to UTF-16: error code %lu",
GetLastError())));
}
((LPWSTR) a2p)[r] = 0;