aboutsummaryrefslogtreecommitdiff
path: root/lux-lua
diff options
context:
space:
mode:
authorEduardo Julian2022-08-11 16:50:42 -0400
committerEduardo Julian2022-08-11 16:50:42 -0400
commite5625dd840a8b8adc76987f649da254335d3d93a (patch)
treefb672669383525d90d462edf8c141f98bc953894 /lux-lua
parent065e8a4d8122d4616b570496915d2c0e2c78cd6b (diff)
Improved exception-definition macro.
Diffstat (limited to 'lux-lua')
-rw-r--r--lux-lua/source/program.lux10
1 files changed, 6 insertions, 4 deletions
diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux
index 3292b7feb..8a88b7d79 100644
--- a/lux-lua/source/program.lux
+++ b/lux-lua/source/program.lux
@@ -8,7 +8,7 @@
[control
["[0]" maybe]
["[0]" try (.only Try)]
- ["[0]" exception (.only exception)]
+ ["[0]" exception (.only Exception)]
["[0]" io (.only IO io)]
["[0]" function]
[concurrency
@@ -168,7 +168,8 @@
(schedulingContextFactory [] net/sandius/rembulan/runtime/SchedulingContextFactory)
(call [net/sandius/rembulan/StateContext java/lang/Object [java/lang/Object]] "try" [java/lang/Object]))
- (exception (unknown_kind_of_object [object java/lang/Object])
+ (exception.def (unknown_kind_of_object object)
+ (Exception java/lang/Object)
(exception.report
(list ["Class" (ffi.of_string (java/lang/Object::toString (java/lang/Object::getClass object)))]
["Object" (ffi.of_string (java/lang/Object::toString object))])))
@@ -225,7 +226,7 @@
{try.#Failure error}))
{try.#Success output}))))
- (exception .public nil_has_no_lux_representation)
+ (exception.def .public nil_has_no_lux_representation)
(def (read host_object)
Translator
@@ -446,7 +447,8 @@
(panic! (exception.error ..unknown_kind_of_object [(as java/lang/Object field)])))))
)))
- (exception (cannot_apply_a_non_function [object java/lang/Object])
+ (exception.def (cannot_apply_a_non_function object)
+ (Exception java/lang/Object)
(exception.report
(list ["Non-function" (ffi.of_string (java/lang/Object::toString object))])))