chore(scanner): better error reporting

This commit is contained in:
Marcus Holland-Moritz 2024-07-31 18:28:06 +02:00
parent 1dfeb2e7f9
commit 6a0ac46293

View File

@ -428,7 +428,8 @@ scanner_<LoggerPolicy>::add_entry(std::filesystem::path const& name,
break; break;
default: default:
LOG_ERROR << "unsupported entry type: " << int(pe->type()); LOG_ERROR << "unsupported entry type: " << int(pe->type()) << " ("
<< pe->fs_path() << ")";
prog.errors++; prog.errors++;
break; break;
} }
@ -436,7 +437,8 @@ scanner_<LoggerPolicy>::add_entry(std::filesystem::path const& name,
return pe; return pe;
} catch (const std::system_error& e) { } catch (const std::system_error& e) {
LOG_ERROR << "error reading entry: " << exception_str(e); LOG_ERROR << fmt::format("error reading entry (path={}): {}", name.string(),
exception_str(e));
prog.errors++; prog.errors++;
} }