Tue, 06 Apr 2010 14:46:30 +0100
Add errors for when trying to index non-tables
lvm.js | file | annotate | diff | comparison | revisions |
--- a/lvm.js Mon Apr 05 17:23:18 2010 +0100 +++ b/lvm.js Tue Apr 06 14:46:30 2010 +0100 @@ -30,6 +30,8 @@ return new LValue("nil", null); return val; } + else + throw "Attempt to index a " + this.type + " value"; }, setIndex: function (key, value) { @@ -37,6 +39,8 @@ { this.value[key.value] = value; } + else + throw "Attempt to index a " + this.type + " value"; } };