diff core/src/luan/modules/TableLuan.java @ 646:cdc70de628b5

simplify LuanException
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 29 Mar 2016 19:58:39 -0600
parents e3d19d525915
children 8e8c30b72e9b
line wrap: on
line diff
--- a/core/src/luan/modules/TableLuan.java	Tue Mar 29 18:09:51 2016 -0600
+++ b/core/src/luan/modules/TableLuan.java	Tue Mar 29 19:58:39 2016 -0600
@@ -32,16 +32,16 @@
 		return buf.toString();
 	}
 
-	public static void insert(LuanState luan,LuanTable list,int pos,Object value) throws LuanException {
-		Utils.checkNotNull(luan,list);
+	public static void insert(LuanTable list,int pos,Object value) throws LuanException {
+		Utils.checkNotNull(list);
 		if( list.getMetatable() != null )
-			throw new LuanException(luan,"can't insert into a table with a metatable");
+			throw new LuanException("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 {
+	public static Object remove(LuanTable list,int pos) throws LuanException {
 		if( list.getMetatable() != null )
-			throw new LuanException(luan,"can't remove from a table with a metatable");
+			throw new LuanException("can't remove from a table with a metatable");
 		return list.rawRemove(pos);
 	}
 
@@ -51,7 +51,7 @@
 
 	public static void sort(final LuanState luan,LuanTable list,final LuanFunction comp) throws LuanException {
 		if( list.getMetatable() != null )
-			throw new LuanException(luan,"can't sort a table with a metatable");
+			throw new LuanException("can't sort a table with a metatable");
 		final LessThan lt;
 		if( comp==null ) {
 			lt = new LessThan() {