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

simplify LuanException
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 29 Mar 2016 19:58:39 -0600
parents 3ab4f282f0bd
children
line wrap: on
line diff
--- a/core/src/luan/modules/parsers/BBCode.java	Tue Mar 29 18:09:51 2016 -0600
+++ b/core/src/luan/modules/parsers/BBCode.java	Tue Mar 29 19:58:39 2016 -0600
@@ -25,8 +25,8 @@
 	private final boolean toHtml;
 
 	private BBCode(LuanState luan,String text,LuanFunction quoter,boolean toHtml) throws LuanException {
-		Utils.checkNotNull(luan,text,1);
-		Utils.checkNotNull(luan,quoter,2);
+		Utils.checkNotNull(text,1);
+		Utils.checkNotNull(quoter,2);
 		this.luan = luan;
 		this.parser = new Parser(text);
 		this.quoter = quoter;
@@ -266,7 +266,7 @@
 	private String quote(Object... args) throws LuanException {
 		Object obj = quoter.call(luan,args);
 		if( !(obj instanceof String) )
-			throw new LuanException(luan,"BBCode quoter function returned "+Luan.type(obj)+" but string required");
+			throw new LuanException("BBCode quoter function returned "+Luan.type(obj)+" but string required");
 		return (String)obj;
 	}