Log file name on error in FileChecker ctor

This commit is contained in:
vdimir 2021-05-25 14:11:20 +03:00
parent ea97eee326
commit de764d8be4
No known key found for this signature in database
GPG Key ID: F57B3E10A21DBB31

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_)