Changeset: ddb352e1859c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ddb352e1859c Modified Files: sql/backends/monet5/vaults/json/json.c Branch: nested Log Message:
give error on missing file diffs (26 lines): diff --git a/sql/backends/monet5/vaults/json/json.c b/sql/backends/monet5/vaults/json/json.c --- a/sql/backends/monet5/vaults/json/json.c +++ b/sql/backends/monet5/vaults/json/json.c @@ -241,12 +241,18 @@ JSONread_json(Client cntxt, MalBlkPtr mb const char* json_str = NULL; JSON *jt = NULL; BAT *b = NULL; - if (jfh) { - json_str = read_json_file(jfh); - json_close(jfh); + if (!jfh) { + sa_destroy(sa); + msg = createException(SQL, "json.read_json", "Failed to open file %s", fname); + return msg; } - if (json_str) + json_str = read_json_file(jfh); + json_close(jfh); + if (json_str) { + printf("%s\n", json_str); + fflush(stdout); jt = JSONparse(json_str); + } if (jt) { if (jt->error == NULL) { b = COLnew(0, TYPE_json, 0, TRANSIENT); _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org