Skip to content

Commit

Permalink
Check if file exists in dump-info tool
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisspyB committed Jan 9, 2025
1 parent 042bd59 commit 64348b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tools/gribjump-dump-info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ void DumpInfo::usage(const std::string &tool) const {
void DumpInfo::execute(const eckit::option::CmdArgs &args) {
for (size_t i = 0; i < args.count(); i++) {
eckit::PathName file(args(i));
if (!file.exists()) {
throw eckit::UserError("File not found", file);
}
IndexFile index = IndexFile(file);
index.print(std::cout);
}
Expand Down

0 comments on commit 64348b0

Please sign in to comment.