Mercurial Hosting > luan
diff src/luan/lib/TableLib.java @ 88:6ca02b188dba
add LuanBit to clean up code;
add repr();
git-svn-id: https://luan-java.googlecode.com/svn/trunk@89 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Wed, 27 Feb 2013 23:50:32 +0000 |
parents | 6db8f286fa6c |
children | b1e87f1bcc13 |
line wrap: on
line diff
--- a/src/luan/lib/TableLib.java Wed Feb 27 19:42:09 2013 +0000 +++ b/src/luan/lib/TableLib.java Wed Feb 27 23:50:32 2013 +0000 @@ -52,7 +52,7 @@ buf.append(sep); String s = Luan.asString(val); if( s==null ) - throw new LuanException( luan, LuanElement.JAVA, "invalid value ("+Luan.type(val)+") at index "+k+" in table for 'concat'" ); + throw luan.JAVA.exception( "invalid value ("+Luan.type(val)+") at index "+k+" in table for 'concat'" ); buf.append(val); } return buf.toString(); @@ -62,7 +62,7 @@ try { list.insert(pos,value); } catch(IndexOutOfBoundsException e) { - throw new LuanException( luan, LuanElement.JAVA, e); + throw luan.JAVA.exception(e); } } @@ -70,7 +70,7 @@ try { return list.remove(pos); } catch(IndexOutOfBoundsException e) { - throw new LuanException( luan, LuanElement.JAVA, e); + throw luan.JAVA.exception(e); } } @@ -84,7 +84,7 @@ lt = new LessThan() { public boolean isLessThan(Object o1,Object o2) { try { - return luan.isLessThan(LuanElement.JAVA,o1,o2); + return luan.JAVA.isLessThan(o1,o2); } catch(LuanException e) { throw new LuanRuntimeException(e); } @@ -94,7 +94,7 @@ lt = new LessThan() { public boolean isLessThan(Object o1,Object o2) { try { - return Luan.toBoolean(Luan.first(luan.call(comp,LuanElement.JAVA,"comp-arg",o1,o2))); + return Luan.toBoolean(Luan.first(luan.JAVA.call(comp,"comp-arg",o1,o2))); } catch(LuanException e) { throw new LuanRuntimeException(e); }