Mercurial Hosting > luan
comparison src/luan/lib/PackageLib.java @ 91:1f8b6edc2b08
better error message
git-svn-id: https://luan-java.googlecode.com/svn/trunk@92 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 07 Mar 2013 22:52:53 +0000 |
parents | b1e87f1bcc13 |
children | 72a4a5550ec7 |
comparison
equal
deleted
inserted
replaced
90:b1e87f1bcc13 | 91:1f8b6edc2b08 |
---|---|
62 for( Object s : searchers.asList() ) { | 62 for( Object s : searchers.asList() ) { |
63 LuanFunction searcher = (LuanFunction)s; | 63 LuanFunction searcher = (LuanFunction)s; |
64 Object[] a = luan.JAVA.call(searcher,"<searcher>",modName); | 64 Object[] a = luan.JAVA.call(searcher,"<searcher>",modName); |
65 if( a.length >= 1 && a[0] instanceof LuanFunction ) { | 65 if( a.length >= 1 && a[0] instanceof LuanFunction ) { |
66 LuanFunction loader = (LuanFunction)a[0]; | 66 LuanFunction loader = (LuanFunction)a[0]; |
67 luan.JAVA.call(loader,"<loader>"); | 67 luan.JAVA.call(loader,"<require \""+modName+"\">"); |
68 mod = (LuanTable)luan.loaded().get(modName); | 68 mod = (LuanTable)luan.loaded().get(modName); |
69 if( mod==null ) | 69 if( mod==null ) |
70 throw luan.JAVA.exception( "module '"+modName+"' didn't define its module" ); | 70 throw luan.JAVA.exception( "module '"+modName+"' didn't define its module" ); |
71 break; | 71 break; |
72 } | 72 } |