Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0c620a5

Browse files
committed
Improve error messages after LoadLibrary()
Move the file name to a format parameter to ease translatability. Adderror code where missing. Make the wording consistent.
1 parente894c61 commit0c620a5

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

‎src/backend/libpq/auth.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,8 +1518,8 @@ pg_SSPI_recvauth(Port *port)
15181518
secur32=LoadLibrary("SECUR32.DLL");
15191519
if (secur32==NULL)
15201520
ereport(ERROR,
1521-
(errmsg_internal("could not loadsecur32.dll: error code %lu",
1522-
GetLastError())));
1521+
(errmsg("could not loadlibrary \"%s\": error code %lu",
1522+
"SECUR32.DLL",GetLastError())));
15231523

15241524
_QuerySecurityContextToken= (QUERY_SECURITY_CONTEXT_TOKEN_FN)
15251525
GetProcAddress(secur32,"QuerySecurityContextToken");
@@ -2517,7 +2517,8 @@ InitializeLDAPConnection(Port *port, LDAP **ldap)
25172517
* wldap32, but check anyway
25182518
*/
25192519
ereport(LOG,
2520-
(errmsg("could not load wldap32.dll")));
2520+
(errmsg("could not load library \"%s\": error code %lu",
2521+
"WLDAP32.DLL",GetLastError())));
25212522
ldap_unbind(*ldap);
25222523
returnSTATUS_ERROR;
25232524
}

‎src/common/restricted_token.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
6161
Advapi32Handle=LoadLibrary("ADVAPI32.DLL");
6262
if (Advapi32Handle==NULL)
6363
{
64-
pg_log_error("could not loadadvapi32.dll: error code %lu",
65-
GetLastError());
64+
pg_log_error("could not loadlibrary \"%s\": error code %lu",
65+
"ADVAPI32.DLL",GetLastError());
6666
return0;
6767
}
6868

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp