aboutsummaryrefslogtreecommitdiff
path: root/lux-js/source/program.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-07-06 16:25:43 -0400
committerEduardo Julian2022-07-06 16:25:43 -0400
commit5270f301eba5237feebc8eca14aee6b7a992a819 (patch)
treea1adb545189f4db807d712a1fcc7d20048c11222 /lux-js/source/program.lux
parent0c32c7f03ad1f8f0db54b623dc407713bbf8cacd (diff)
Made exception.report a function.
Diffstat (limited to '')
-rw-r--r--lux-js/source/program.lux28
1 files changed, 14 insertions, 14 deletions
diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux
index c766074fb..1df4d4803 100644
--- a/lux-js/source/program.lux
+++ b/lux-js/source/program.lux
@@ -155,8 +155,8 @@
(exception (unknown_member [member Text
object java/lang/Object])
(exception.report
- "Member" member
- "Object" (debug.inspection object)))
+ (list ["Member" member]
+ ["Object" (debug.inspection object)])))
(def jvm_int
(-> (I64 Any) java/lang/Integer)
@@ -311,17 +311,17 @@
(exception (unknown_kind_of_host_object [object java/lang/Object])
(exception.report
- "Class" (ffi.of_string (java/lang/Object::toString (java/lang/Object::getClass object)))
- "Object" (ffi.of_string (java/lang/Object::toString object))
- "Keys" (case (ffi.is org/openjdk/nashorn/api/scripting/ScriptObjectMirror object)
- {.#Some object}
- (|> object
- (org/openjdk/nashorn/api/scripting/ScriptObjectMirror::getOwnKeys true)
- (array.list {.#None})
- (%.list (|>> ffi.of_string %.text)))
-
- {.#None}
- "???")))
+ (list ["Class" (ffi.of_string (java/lang/Object::toString (java/lang/Object::getClass object)))]
+ ["Object" (ffi.of_string (java/lang/Object::toString object))]
+ ["Keys" (case (ffi.is org/openjdk/nashorn/api/scripting/ScriptObjectMirror object)
+ {.#Some object}
+ (|> object
+ (org/openjdk/nashorn/api/scripting/ScriptObjectMirror::getOwnKeys true)
+ (array.list {.#None})
+ (%.list (|>> ffi.of_string %.text)))
+
+ {.#None}
+ "???")])))
(def (i32 half i64)
(-> Text org/openjdk/nashorn/api/scripting/ScriptObjectMirror (Maybe Int))
@@ -475,7 +475,7 @@
(exception (cannot_apply_a_non_function [object java/lang/Object])
(exception.report
- "Object" (ffi.of_string (java/lang/Object::toString object))))
+ (list ["Object" (ffi.of_string (java/lang/Object::toString object))])))
(def (expander macro inputs lux)
Expander