Mercurial Hosting > luan
diff core/src/luan/modules/BasicLuan.java @ 481:5d4a78c93383
luan errors are now tables
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 11 May 2015 20:26:36 -0600 |
parents | bab5607a0eed |
children | 4dc9cb26a3a8 |
line wrap: on
line diff
--- a/core/src/luan/modules/BasicLuan.java Mon May 11 16:43:04 2015 -0600 +++ b/core/src/luan/modules/BasicLuan.java Mon May 11 20:26:36 2015 -0600 @@ -108,8 +108,8 @@ return luan.toString(v); } - public static void error(LuanState luan,Object msg) throws LuanException { - throw luan.exception(msg); + public static LuanTable new_error(LuanState luan,Object msg) throws LuanException { + return luan.exception(msg).table(); } public static String assert_string(LuanState luan,String v) throws LuanException { @@ -204,7 +204,7 @@ } catch(LuanException e) { if( catchFn == null ) throw e; - return luan.call(catchFn,new Object[]{e}); + return luan.call(catchFn,new Object[]{e.table()}); } finally { if( finallyFn != null ) luan.call(finallyFn); @@ -221,7 +221,7 @@ } return rtn; } catch(LuanException e) { - return new Object[]{false,e}; + return new Object[]{false,e.table()}; } }