Mercurial Hosting > luan
diff core/src/luan/modules/BasicLuan.java @ 589:97c8ae330efe
add varargs to Luan.try;
add Io.output_to and Io.output_of;
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 26 Aug 2015 04:38:37 -0600 |
parents | 0742ac78fa69 |
children | 53a50c70c5e2 |
line wrap: on
line diff
--- a/core/src/luan/modules/BasicLuan.java Tue Aug 25 10:07:37 2015 -0600 +++ b/core/src/luan/modules/BasicLuan.java Wed Aug 26 04:38:37 2015 -0600 @@ -190,7 +190,7 @@ return obj instanceof LuanFunction ? (LuanFunction)obj : null; } - public static Object try_(LuanState luan,LuanTable blocks) throws LuanException { + public static Object try_(LuanState luan,LuanTable blocks,Object... args) throws LuanException { Utils.checkNotNull(luan,blocks); Object obj = blocks.get(luan,1); if( obj == null ) @@ -213,7 +213,7 @@ finallyFn = (LuanFunction)obj; } try { - return tryFn.call(luan); + return tryFn.call(luan,args); } catch(LuanException e) { if( catchFn == null ) throw e;