Mercurial Hosting > luan
comparison src/luan/modules/BasicLuan.java @ 1316:11d3640e739d
load_file returns nil for missing file
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 31 Jan 2019 04:26:23 -0700 |
parents | 5345466fa61f |
children | f41919741100 |
comparison
equal
deleted
inserted
replaced
1315:5763597ca5c0 | 1316:11d3640e739d |
---|---|
37 } else if( fileName.indexOf(':') == -1 ) { | 37 } else if( fileName.indexOf(':') == -1 ) { |
38 fileName = "file:" + fileName; | 38 fileName = "file:" + fileName; |
39 } | 39 } |
40 String src = PackageLuan.read(luan,fileName); | 40 String src = PackageLuan.read(luan,fileName); |
41 if( src == null ) | 41 if( src == null ) |
42 throw new LuanException("file '"+fileName+"' not found" ); | 42 return null; |
43 return load(src,fileName,null); | 43 return load(src,fileName,null); |
44 } | 44 } |
45 | 45 |
46 public static LuanFunction pairs(final LuanTable t) throws LuanException { | 46 public static LuanFunction pairs(final LuanTable t) throws LuanException { |
47 Utils.checkNotNull(t); | 47 Utils.checkNotNull(t); |