1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-03-13 23:18:16 +00:00

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

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);