Skip to content

Commit

Permalink
Improved CLI error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
JPenuchot committed Mar 28, 2022
1 parent 6e10409 commit 624a385
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions grapher/lib/grapher/utils/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ build_category(llvm::cl::list<std::string> const &benchmark_path_list) {
fs::path bench_path(bench_path_str.data());

if (!fs::is_directory(bench_path)) {
llvm::errs() << "[WARNING] Not a directory: " << bench_path << '\n';
llvm::errs() << "[WARNING] Not a directory: " << bench_path
<< " (current path: " << fs::current_path() << ").\n";
continue;
}

Expand All @@ -36,7 +37,9 @@ build_category(llvm::cl::list<std::string> const &benchmark_path_list) {
std::istringstream iss(entry_dir.path().filename().stem());
if (!(iss >> iteration.size)) {
llvm::errs() << "[WARNING] Entry directory name is not a size: "
<< entry_dir.path() << '\n';
<< entry_dir.path()
<< " (current path: " << fs::current_path() << ").\n";

continue;
}
}
Expand All @@ -49,7 +52,9 @@ build_category(llvm::cl::list<std::string> const &benchmark_path_list) {
if (!std::filesystem::is_regular_file(sample_path_entry)) {
llvm::errs()
<< "[WARNING] Invalid repetition file (not a regular file): "
<< sample_path_entry.path() << '\n';
<< sample_path_entry.path()
<< " (current path: " << fs::current_path() << ").\n";

continue;
}

Expand Down

0 comments on commit 624a385

Please sign in to comment.