Commit 90472906 authored by Philipp  Trunschke's avatar Philipp Trunschke
Browse files

raise exception when load_from_file cannot read file (fixes #249)

parent 6ddda9ec
Pipeline #1438 passed with stages
in 19 minutes and 41 seconds
......@@ -57,7 +57,7 @@ void expose_misc(module& m) {
// determine type stored in the file
std::ifstream in(_filename);
if (!in) {
throw value_error("IOError"); //TODO...
throw std::runtime_error("could not read file '" + _filename + "'");
}
std::string classname;
in >> classname; // "Xerus"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment