mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 08:32:13 +11:00
further safegaurds
This commit is contained in:
parent
cc3aa0882a
commit
596ae46286
1 changed files with 6 additions and 2 deletions
|
|
@ -214,8 +214,10 @@ public:
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!temp.isNull())
|
||||||
writer->write(temp, &user_save);
|
{
|
||||||
|
writer->write(temp, &user_save);
|
||||||
|
}
|
||||||
user_save.close();
|
user_save.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -230,6 +232,8 @@ public:
|
||||||
JSONCPP_STRING errs;
|
JSONCPP_STRING errs;
|
||||||
if (!parseFromStream(builder, user_save, &temp, &errs))
|
if (!parseFromStream(builder, user_save, &temp, &errs))
|
||||||
{
|
{
|
||||||
|
std::cerr<<errs<<'\n';
|
||||||
|
throw std::invalid_argument("Parsing Failed\n");
|
||||||
user_save.close();
|
user_save.close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue