diff core/src/luan/LuanTable.java @ 646:cdc70de628b5

simplify LuanException
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 29 Mar 2016 19:58:39 -0600
parents 60c549d43988
children 8e8c30b72e9b
line wrap: on
line diff
--- a/core/src/luan/LuanTable.java	Tue Mar 29 18:09:51 2016 -0600
+++ b/core/src/luan/LuanTable.java	Tue Mar 29 19:58:39 2016 -0600
@@ -160,7 +160,7 @@
 			tbl.put(luan,key,value);
 			return;
 		}
-		throw new LuanException(luan,"invalid type "+Luan.type(h)+" for metamethod __new_index");
+		throw new LuanException("invalid type "+Luan.type(h)+" for metamethod __new_index");
 	}
 
 	public void rawPut(Object key,Object val) {
@@ -319,14 +319,14 @@
 				LuanFunction fn = (LuanFunction)h;
 				Object obj = Luan.first(fn.call(luan,new Object[]{this}));
 				if( !(obj instanceof LuanFunction) )
-					throw new LuanException(luan, "metamethod __pairs should return function but returned " + Luan.type(obj) );
+					throw new LuanException( "metamethod __pairs should return function but returned " + Luan.type(obj) );
 				return (LuanFunction)obj;
 			}
 			if( h instanceof LuanMeta ) {
 				LuanMeta meta = (LuanMeta)h;
 				return meta.__pairs(luan,this);
 			}
-			throw new LuanException(luan, "invalid type of metamethod __pairs: " + Luan.type(h) );
+			throw new LuanException( "invalid type of metamethod __pairs: " + Luan.type(h) );
 		}
 		return rawPairs();
 	}