mirror of
https://github.com/postgres/postgres.git
synced 2025-04-20 00:42:27 +03:00
Improve error messages after LoadLibrary()
Move the file name to a format parameter to ease translatability. Add error code where missing. Make the wording consistent.
This commit is contained in:
parent
e894c61836
commit
0c620a5803
@ -1518,8 +1518,8 @@ pg_SSPI_recvauth(Port *port)
|
|||||||
secur32 = LoadLibrary("SECUR32.DLL");
|
secur32 = LoadLibrary("SECUR32.DLL");
|
||||||
if (secur32 == NULL)
|
if (secur32 == NULL)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errmsg_internal("could not load secur32.dll: error code %lu",
|
(errmsg("could not load library \"%s\": error code %lu",
|
||||||
GetLastError())));
|
"SECUR32.DLL", GetLastError())));
|
||||||
|
|
||||||
_QuerySecurityContextToken = (QUERY_SECURITY_CONTEXT_TOKEN_FN)
|
_QuerySecurityContextToken = (QUERY_SECURITY_CONTEXT_TOKEN_FN)
|
||||||
GetProcAddress(secur32, "QuerySecurityContextToken");
|
GetProcAddress(secur32, "QuerySecurityContextToken");
|
||||||
@ -2517,7 +2517,8 @@ InitializeLDAPConnection(Port *port, LDAP **ldap)
|
|||||||
* wldap32, but check anyway
|
* wldap32, but check anyway
|
||||||
*/
|
*/
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("could not load wldap32.dll")));
|
(errmsg("could not load library \"%s\": error code %lu",
|
||||||
|
"WLDAP32.DLL", GetLastError())));
|
||||||
ldap_unbind(*ldap);
|
ldap_unbind(*ldap);
|
||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -61,8 +61,8 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
|
|||||||
Advapi32Handle = LoadLibrary("ADVAPI32.DLL");
|
Advapi32Handle = LoadLibrary("ADVAPI32.DLL");
|
||||||
if (Advapi32Handle == NULL)
|
if (Advapi32Handle == NULL)
|
||||||
{
|
{
|
||||||
pg_log_error("could not load advapi32.dll: error code %lu",
|
pg_log_error("could not load library \"%s\": error code %lu",
|
||||||
GetLastError());
|
"ADVAPI32.DLL", GetLastError());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user