diff core/src/luan/modules/PackageLuan.java @ 578:60c549d43988

remove LuanState.exception()
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 14 Jul 2015 17:40:48 -0600
parents 7c3ad6db8ac3
children 859c0dedc8b6
line wrap: on
line diff
--- a/core/src/luan/modules/PackageLuan.java	Mon Jul 13 20:53:02 2015 -0600
+++ b/core/src/luan/modules/PackageLuan.java	Tue Jul 14 17:40:48 2015 -0600
@@ -35,7 +35,7 @@
 	public static Object require(LuanState luan,String modName) throws LuanException {
 		Object mod = load(luan,modName);
 		if( mod==null )
-			throw luan.exception( "module '"+modName+"' not found" );
+			throw new LuanException(luan, "module '"+modName+"' not found" );
 		return mod;
 	}
 
@@ -57,7 +57,7 @@
 					mod = loaded.rawGet(modName);
 					if( mod != null )
 						return mod;
-					throw luan.exception( "module '"+modName+"' returned nil" );
+					throw new LuanException(luan, "module '"+modName+"' returned nil" );
 				}
 			}
 			loaded.rawPut(modName,mod);