Skip to content
Snippets Groups Projects

F better errors

Merged Joscha Schmiedt requested to merge f-better-errors into dev
3 files
+ 30
14
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 4
0
@@ -108,6 +108,10 @@ template <> auto getEnumValueFromName<Role>(const std::string &name) -> Role {
auto load_string_file(const path &file_path) -> std::string {
std::string result;
if (!exists(file_path)) {
throw std::runtime_error("File not found: " + file_path.string());
}
// adapted from boost::filesystem::load_string_file, which was removed in 1.84
std::ifstream file;
file.exceptions(std::ios_base::failbit | std::ios_base::badbit);
Loading