comparison 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
comparison
equal deleted inserted replaced
221:ec016471c6eb 222:b76fcb72d97d
23 23
24 private void newindex(LuanStateImpl luan,Object t,Object key,Object value) throws LuanException { 24 private void newindex(LuanStateImpl luan,Object t,Object key,Object value) throws LuanException {
25 Object h; 25 Object h;
26 if( t instanceof LuanTable ) { 26 if( t instanceof LuanTable ) {
27 LuanTable table = (LuanTable)t; 27 LuanTable table = (LuanTable)t;
28 Object old = table.put(key,value); 28 Object old;
29 try {
30 old = table.put(key,value);
31 } catch(IllegalArgumentException e) {
32 throw luan.bit(se).exception(e);
33 } catch(UnsupportedOperationException e) {
34 throw luan.bit(se).exception(e);
35 }
29 if( old != null ) 36 if( old != null )
30 return; 37 return;
31 h = luan.getHandler("__newindex",t); 38 h = luan.getHandler("__newindex",t);
32 if( h==null ) 39 if( h==null )
33 return; 40 return;