mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-05-05 00:34:07 +00:00
throw an exception when file does not exist
This commit is contained in:
parent
0ae3ab3c9b
commit
e3664c79a3
@ -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)) {
|
EX void load(const string& fname, bool after_sliding IS(false)) {
|
||||||
fhstream f(fname, "rt");
|
fhstream f(fname, "rt");
|
||||||
|
if(!f.f) throw hr_parse_exception("file " + fname + " does not exist");
|
||||||
string s;
|
string s;
|
||||||
while(true) {
|
while(true) {
|
||||||
int c = fgetc(f.f);
|
int c = fgetc(f.f);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user