diff options
-rw-r--r-- | src/binary_reader.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/binary_reader.cpp b/src/binary_reader.cpp index 04633a2..0727703 100644 --- a/src/binary_reader.cpp +++ b/src/binary_reader.cpp @@ -37,7 +37,12 @@ BinaryReader::BinaryReader(std::string file_path): _pointer{0} { std::ifstream file(file_path, std::ios::binary | std::ios::ate); - if(!file.is_open()) throw std::runtime_error{"failed to open file"}; + if(!file.is_open()) + { + std::string error{"failed to open file: "}; + error += file_path; + throw std::runtime_error{error}; + } this->_size = file.tellg(); file.seekg(0); |