From 5270f301eba5237feebc8eca14aee6b7a992a819 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 6 Jul 2022 16:25:43 -0400 Subject: Made exception.report a function. --- lux-js/source/program.lux | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'lux-js/source') 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 -- cgit v1.2.3