Merge pull request #24489 from vdimir/log-fname-file-checker

Log file name on error in FileChecker ctor
This commit is contained in:
alesapin 2021-05-28 17:44:20 +03:00 committed by GitHub
commit 97aef92df8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,15 @@ namespace ErrorCodes
FileChecker::FileChecker(DiskPtr disk_, const String & file_info_path_) : disk(std::move(disk_))
{
setPath(file_info_path_);
load();
try
{
load();
}
catch (DB::Exception & e)
{
e.addMessage("Error loading file {}", files_info_path);
throw;
}
}
void FileChecker::setPath(const String & file_info_path_)