better error message on failure to open JSON file
This commit is contained in:
parent
15d9b3d3cc
commit
cdd0f0fea0
@ -749,6 +749,10 @@ bool parse_json_file(std::istream &f, std::string &filename, Context *ctx)
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
using namespace JsonParser;
|
using namespace JsonParser;
|
||||||
|
|
||||||
|
if (!f)
|
||||||
|
log_error("failed to open JSON file.\n");
|
||||||
|
|
||||||
int lineno = 1;
|
int lineno = 1;
|
||||||
|
|
||||||
JsonNode root(f, lineno);
|
JsonNode root(f, lineno);
|
||||||
|
Loading…
Reference in New Issue
Block a user