diff core/src/luan/impl/SetTableEntry.java @ 222:b76fcb72d97d

add AbstractLuanTable and improve HttpLuan git-svn-id: https://luan-java.googlecode.com/svn/trunk@223 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Mon, 21 Jul 2014 02:23:05 +0000
parents cf939124461a
children 05eb2837ddbf
line wrap: on
line diff
--- a/core/src/luan/impl/SetTableEntry.java	Thu Jul 17 07:49:26 2014 +0000
+++ b/core/src/luan/impl/SetTableEntry.java	Mon Jul 21 02:23:05 2014 +0000
@@ -25,7 +25,14 @@
 		Object h;
 		if( t instanceof LuanTable ) {
 			LuanTable table = (LuanTable)t;
-			Object old = table.put(key,value);
+			Object old;
+			try {
+				old = table.put(key,value);
+			} catch(IllegalArgumentException e) {
+				throw luan.bit(se).exception(e);
+			} catch(UnsupportedOperationException e) {
+				throw luan.bit(se).exception(e);
+			}
 			if( old != null )
 				return;
 			h = luan.getHandler("__newindex",t);