1
0
mirror of https://github.com/YosysHQ/nextpnr.git synced 2026-05-01 14:05:55 +00:00

better error message on failure to open JSON file

This commit is contained in:
Darrell Harmon
2018-11-11 12:50:14 -07:00
parent 15d9b3d3cc
commit cdd0f0fea0

View File

@@ -749,6 +749,10 @@ bool parse_json_file(std::istream &f, std::string &filename, Context *ctx)
{
try {
using namespace JsonParser;
if (!f)
log_error("failed to open JSON file.\n");
int lineno = 1;
JsonNode root(f, lineno);