Fix exception messages in clickhouse su

Fix exception messages in
This commit is contained in:
filimonov 2022-06-30 11:38:05 +02:00 committed by GitHub
parent be213c0be7
commit 3949480ed3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ void setUserAndGroup(std::string arg_uid, std::string arg_gid)
throwFromErrno(fmt::format("Cannot do 'getgrnam_r' to obtain gid from group name ({})", arg_gid), ErrorCodes::SYSTEM_ERROR);
if (!result)
throw Exception("Group {} is not found in the system", ErrorCodes::BAD_ARGUMENTS);
throw Exception(fmt::format("Group {} is not found in the system", arg_gid), ErrorCodes::BAD_ARGUMENTS);
gid = entry.gr_gid;
}
@ -84,7 +84,7 @@ void setUserAndGroup(std::string arg_uid, std::string arg_gid)
throwFromErrno(fmt::format("Cannot do 'getpwnam_r' to obtain uid from user name ({})", arg_uid), ErrorCodes::SYSTEM_ERROR);
if (!result)
throw Exception("User {} is not found in the system", ErrorCodes::BAD_ARGUMENTS);
throw Exception(fmt::format("User {} is not found in the system", arg_uid), ErrorCodes::BAD_ARGUMENTS);
uid = entry.pw_uid;
}