Mercurial Hosting > luan
diff core/src/luan/modules/Luan.luan @ 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 | 7e9fcfbf22ec |
line wrap: on
line diff
--- a/core/src/luan/modules/Luan.luan Mon May 11 16:43:04 2015 -0600 +++ b/core/src/luan/modules/Luan.luan Mon May 11 20:26:36 2015 -0600 @@ -8,11 +8,11 @@ assert_number = BasicLuan.assert_number assert_string = BasicLuan.assert_string assert_table = BasicLuan.assert_table -error = BasicLuan.error get_metatable = BasicLuan.get_metatable ipairs = BasicLuan.ipairs load = BasicLuan.load load_file = BasicLuan.load_file +new_error = BasicLuan.new_error pairs = BasicLuan.pairs pcall = BasicLuan.pcall range = BasicLuan.range @@ -32,6 +32,10 @@ VERSION = do_file "classpath:luan/version.luan" +function error(message) + new_error(message).throw() +end + local error = error function assert(v,message)