throw an exception when file does not exist

This commit is contained in:
Zeno Rogue 2020-06-03 11:43:48 +02:00
parent 0ae3ab3c9b
commit e3664c79a3
1 changed files with 1 additions and 0 deletions

View File

@ -216,6 +216,7 @@ EX void load_tile(exp_parser& ep, arbi_tiling& c, bool unit) {
EX void load(const string& fname, bool after_sliding IS(false)) {
fhstream f(fname, "rt");
if(!f.f) throw hr_parse_exception("file " + fname + " does not exist");
string s;
while(true) {
int c = fgetc(f.f);