lvm.js

changeset 7
00ec5f6e7579
parent 6
418fd175eaed
child 8
e7de6d1fee96
--- 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";
 	}
 };
 

mercurial