5,337
edits
Line 157: | Line 157: | ||
#include <cerrno> | #include <cerrno> | ||
std::string get_file_contents(std::string filename) | std::string get_file_contents(std::string &filename) | ||
{ | { | ||
std::ifstream in(filename, std::ios::in | std::ios::binary); | std::ifstream in(filename, std::ios::in | std::ios::binary); | ||
Line 169: | Line 169: | ||
return contents; | return contents; | ||
} | } | ||
std::cerr << "Failed to open file: " << filename << std::endl; | |||
throw(errno); | throw(errno); | ||
} | } |