Mercurial Hosting > luan
diff src/luan/lib/PackageLib.java @ 88:6ca02b188dba
add LuanBit to clean up code;
add repr();
git-svn-id: https://luan-java.googlecode.com/svn/trunk@89 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Wed, 27 Feb 2013 23:50:32 +0000 |
parents | 6db8f286fa6c |
children | b1e87f1bcc13 |
line wrap: on
line diff
--- a/src/luan/lib/PackageLib.java Wed Feb 27 19:42:09 2013 +0000 +++ b/src/luan/lib/PackageLib.java Wed Feb 27 23:50:32 2013 +0000 @@ -61,18 +61,18 @@ searchers = new LuanTable(Collections.<Object>singletonList(preloadSearcher)); for( Object s : searchers.asList() ) { LuanFunction searcher = (LuanFunction)s; - Object[] a = luan.call(searcher,LuanElement.JAVA,"<searcher>",modName); + Object[] a = luan.JAVA.call(searcher,"<searcher>",modName); if( a.length >= 1 && a[0] instanceof LuanFunction ) { LuanFunction loader = (LuanFunction)a[0]; - luan.call(loader,LuanElement.JAVA,"<loader>"); + luan.JAVA.call(loader,"<loader>"); mod = (LuanTable)luan.loaded().get(modName); if( mod==null ) - throw new LuanException( luan, LuanElement.JAVA, "module '"+modName+"' didn't define its module" ); + throw luan.JAVA.exception( "module '"+modName+"' didn't define its module" ); break; } } if( mod == null ) - throw new LuanException( luan, LuanElement.JAVA, "module '"+modName+"' not found" ); + throw luan.JAVA.exception( "module '"+modName+"' not found" ); } if( env != null ) env.put(modName,mod); @@ -135,7 +135,7 @@ LuanFunction fn = BasicLib.load(luan,src,url.toString(),null); fn.call(luan,EMPTY); } catch(IOException e) { - throw new LuanException(luan,LuanElement.JAVA,e); + throw luan.JAVA.exception(e); } } };