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-ruby/source/program.lux | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'lux-ruby') diff --git a/lux-ruby/source/program.lux b/lux-ruby/source/program.lux index 2e9d6b06e..35aada877 100644 --- a/lux-ruby/source/program.lux +++ b/lux-ruby/source/program.lux @@ -252,8 +252,8 @@ (exception (unknown_kind_of_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)))) + (list ["Class" (ffi.of_string (java/lang/Object::toString (java/lang/Object::getClass object)))] + ["Object" (ffi.of_string (java/lang/Object::toString object))]))) (def (read_variant read host_object) (-> Translator org/jruby/RubyHash (Try Any)) @@ -349,17 +349,17 @@ (exception (invalid_variant_access [field Text]) (exception.report - "Field" (%.text field))) + (list ["Field" (%.text field)]))) (exception (invalid_index [index java/lang/Object]) (exception.report - "Class" (|> index - java/lang/Object::getClass - java/lang/Object::toString - ffi.of_string) - "Index" (|> index - java/lang/Object::toString - ffi.of_string))) + (list ["Class" (|> index + java/lang/Object::getClass + java/lang/Object::toString + ffi.of_string)] + ["Index" (|> index + java/lang/Object::toString + ffi.of_string)]))) (import java/util/Arrays "[1]::[0]" @@ -367,7 +367,7 @@ (exception (invalid_arity [arity Nat]) (exception.report - "Arity" (%.nat arity))) + (list ["Arity" (%.nat arity)]))) (def (::call useful_object_class lux_structure value) (-> (-> (-> (Array java/lang/Object) org/jruby/runtime/builtin/IRubyObject) @@ -603,7 +603,7 @@ (exception (invalid_operation [method Text]) (exception.report - "Method" (%.text method))) + (list ["Method" (%.text method)]))) (def (::respond_to? value) (-> (Array java/lang/Object) org/jruby/internal/runtime/methods/DynamicMethod) @@ -649,7 +649,7 @@ (exception (unknown_method [method Text]) (exception.report - "Method" (%.text method))) + (list ["Method" (%.text method)]))) (def (useful_object_class lux_structure value) (-> (-> (Array java/lang/Object) org/jruby/runtime/builtin/IRubyObject) @@ -693,7 +693,7 @@ (exception (cannot_apply_a_non_function [object java/lang/Object]) (exception.report - "Non-function" (ffi.of_string (java/lang/Object::toString object)))) + (list ["Non-function" (ffi.of_string (java/lang/Object::toString object))]))) (def macro! (-> Macro (Maybe org/jruby/RubyProc)) @@ -774,8 +774,8 @@ (for @.jvm (these (exception .public (invaid_phase_application [partial_application (List Any) arity (List Any)]) (exception.report - "Partial Application" (%.nat (list.size partial_application)) - "Arity" (%.nat (list.size arity)))) + (list ["Partial Application" (%.nat (list.size partial_application))] + ["Arity" (%.nat (list.size arity))]))) (def proc_type org/jruby/runtime/Block$Type -- cgit v1.2.3