Mercurial Hosting > luan
diff core/src/luan/modules/TableLuan.java @ 578:60c549d43988
remove LuanState.exception()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 14 Jul 2015 17:40:48 -0600 |
parents | 7c3ad6db8ac3 |
children | 1e69d9c21461 |
line wrap: on
line diff
--- a/core/src/luan/modules/TableLuan.java Mon Jul 13 20:53:02 2015 -0600 +++ b/core/src/luan/modules/TableLuan.java Tue Jul 14 17:40:48 2015 -0600 @@ -34,13 +34,13 @@ public static void insert(LuanState luan,LuanTable list,int pos,Object value) throws LuanException { if( list.getMetatable() != null ) - throw luan.exception("can't insert into a table with a metatable"); + throw new LuanException(luan,"can't insert into a table with a metatable"); list.rawInsert(pos,value); } public static Object remove(LuanState luan,LuanTable list,int pos) throws LuanException { if( list.getMetatable() != null ) - throw luan.exception("can't remove from a table with a metatable"); + throw new LuanException(luan,"can't remove from a table with a metatable"); return list.rawRemove(pos); } @@ -50,7 +50,7 @@ public static void sort(final LuanState luan,LuanTable list,final LuanFunction comp) throws LuanException { if( list.getMetatable() != null ) - throw luan.exception("can't sort a table with a metatable"); + throw new LuanException(luan,"can't sort a table with a metatable"); final LessThan lt; if( comp==null ) { lt = new LessThan() {