Skip to content

Commit

Permalink
Merge pull request #667 from openzim/informative_file_opening_error
Browse files Browse the repository at this point in the history
Informative error message for a failed file opening operation
  • Loading branch information
kelson42 authored Feb 13, 2022
2 parents c0486c3 + 7bb4192 commit 71d25f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fs_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ FD FS::openFile(path_t filepath)
{
int fd = open(filepath.c_str(), O_RDONLY);
if (fd == -1) {
throw std::runtime_error("");
throw std::runtime_error("Error opening file: " + filepath);
}
return FD(fd);
}
Expand Down

0 comments on commit 71d25f9

Please sign in to comment.