-
• #2
Ahh - thanks! So just to confirm:
require("Storage").write("myfile.json","#0f0"); var c = require("Storage").readJSON("myfile.json",true)||"error";print("Got",c);
Doesn't print anything, when it should have printed
Got error
. It basically stops execution right afterreadJSON
.I've just fixed the error, so new builds should have the fix in
If I am reading the documentation correctly, if myfile.json is mangled, c should be set to undefined, but my app simply dies and never logs anything at all. (If myfile.json doesn't exist, c is set to undefined as expected.) If I change "true" to "false", a syntax error is logged and then the app dies. For the record, myfile.json contained "#0f0" when I discovered the issue, which I am currently working around with try/catch.