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

simplify LuanException
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 29 Mar 2016 19:58:39 -0600
parents 859c0dedc8b6
children 8e8c30b72e9b
line wrap: on
line diff
--- a/core/src/luan/LuanState.java	Tue Mar 29 18:09:51 2016 -0600
+++ b/core/src/luan/LuanState.java	Tue Mar 29 19:58:39 2016 -0600
@@ -65,19 +65,19 @@
 	public Boolean checkBoolean(Object obj) throws LuanException {
 		if( obj instanceof Boolean )
 			return (Boolean)obj;
-		throw new LuanException(this, "attempt to use a " + Luan.type(obj) + " value as a boolean" );
+		throw new LuanException("attempt to use a " + Luan.type(obj) + " value as a boolean" );
 	}
 
 	public String checkString(Object obj) throws LuanException {
 		if( obj instanceof String )
 			return (String)obj;
-		throw new LuanException(this, "attempt to use a " + Luan.type(obj) + " value as a string" );
+		throw new LuanException("attempt to use a " + Luan.type(obj) + " value as a string" );
 	}
 
 	public LuanFunction checkFunction(Object obj) throws LuanException {
 		if( obj instanceof LuanFunction )
 			return (LuanFunction)obj;
-		throw new LuanException(this, "attempt to call a " + Luan.type(obj) + " value" );
+		throw new LuanException("attempt to call a " + Luan.type(obj) + " value" );
 	}
 
 	abstract public boolean isLessThan(Object o1,Object o2) throws LuanException;
@@ -103,7 +103,7 @@
 		}
 		if( obj != null && hasJava() )
 			return JavaLuan.__index(this,obj,key,false);
-		throw new LuanException(this, "attempt to index a " + Luan.type(obj) + " value" );
+		throw new LuanException("attempt to index a " + Luan.type(obj) + " value" );
 	}
 
 /*