mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Merge pull request #48271 from vchekan/master
In messages, put values into quotes
This commit is contained in:
commit
070210a02f
@ -20,14 +20,14 @@ BackupMutablePtr BackupFactory::createBackup(const CreateParams & params) const
|
|||||||
const String & engine_name = params.backup_info.backup_engine_name;
|
const String & engine_name = params.backup_info.backup_engine_name;
|
||||||
auto it = creators.find(engine_name);
|
auto it = creators.find(engine_name);
|
||||||
if (it == creators.end())
|
if (it == creators.end())
|
||||||
throw Exception(ErrorCodes::BACKUP_ENGINE_NOT_FOUND, "Not found backup engine {}", engine_name);
|
throw Exception(ErrorCodes::BACKUP_ENGINE_NOT_FOUND, "Not found backup engine '{}'", engine_name);
|
||||||
return (it->second)(params);
|
return (it->second)(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BackupFactory::registerBackupEngine(const String & engine_name, const CreatorFn & creator_fn)
|
void BackupFactory::registerBackupEngine(const String & engine_name, const CreatorFn & creator_fn)
|
||||||
{
|
{
|
||||||
if (creators.contains(engine_name))
|
if (creators.contains(engine_name))
|
||||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "Backup engine {} was registered twice", engine_name);
|
throw Exception(ErrorCodes::LOGICAL_ERROR, "Backup engine '{}' was registered twice", engine_name);
|
||||||
creators[engine_name] = creator_fn;
|
creators[engine_name] = creator_fn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ namespace
|
|||||||
key = "backups.allowed_disk[" + std::to_string(++counter) + "]";
|
key = "backups.allowed_disk[" + std::to_string(++counter) + "]";
|
||||||
if (!config.has(key))
|
if (!config.has(key))
|
||||||
throw Exception(ErrorCodes::BAD_ARGUMENTS,
|
throw Exception(ErrorCodes::BAD_ARGUMENTS,
|
||||||
"Disk {} is not allowed for backups, see the 'backups.allowed_disk' configuration parameter", quoteString(disk_name));
|
"Disk '{}' is not allowed for backups, see the 'backups.allowed_disk' configuration parameter", quoteString(disk_name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ namespace
|
|||||||
|
|
||||||
bool path_ok = path.empty() || (path.is_relative() && (*path.begin() != ".."));
|
bool path_ok = path.empty() || (path.is_relative() && (*path.begin() != ".."));
|
||||||
if (!path_ok)
|
if (!path_ok)
|
||||||
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Path {} to backup must be inside the specified disk {}",
|
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Path '{}' to backup must be inside the specified disk '{}'",
|
||||||
quoteString(path.c_str()), quoteString(disk_name));
|
quoteString(path.c_str()), quoteString(disk_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user