diff options
author | Eduardo Julian | 2022-03-15 22:45:49 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-03-15 22:45:49 -0400 |
commit | b0093a3849baaeb5e12692b2cf6ac65ba74bbd54 (patch) | |
tree | 26db4a468c2f75c64ba16e8b7dbf20f135d369fc /lux-ruby/source | |
parent | bc36487224f670c23002cc4575c0dba3e5dc1be1 (diff) |
Leaner syntax for library/lux/control/exception.report
Diffstat (limited to 'lux-ruby/source')
-rw-r--r-- | lux-ruby/source/program.lux | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lux-ruby/source/program.lux b/lux-ruby/source/program.lux index a4677a5ee..3b8d46737 100644 --- a/lux-ruby/source/program.lux +++ b/lux-ruby/source/program.lux @@ -254,8 +254,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))])) + "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)) @@ -351,17 +351,17 @@ (exception: (invalid_variant_access [field Text]) (exception.report - ["Field" (%.text field)])) + "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)])) + "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]" @@ -369,7 +369,7 @@ (exception: (invalid_arity [arity Nat]) (exception.report - ["Arity" (%.nat arity)])) + "Arity" (%.nat arity))) (def: (::call useful_object_class lux_structure value) (-> (-> (-> (Array java/lang/Object) org/jruby/runtime/builtin/IRubyObject) @@ -605,7 +605,7 @@ (exception: (invalid_operation [method Text]) (exception.report - ["Method" (%.text method)])) + "Method" (%.text method))) (def: (::respond_to? value) (-> (Array java/lang/Object) org/jruby/internal/runtime/methods/DynamicMethod) @@ -651,7 +651,7 @@ (exception: (unknown_method [method Text]) (exception.report - ["Method" (%.text method)])) + "Method" (%.text method))) (def: (useful_object_class lux_structure value) (-> (-> (Array java/lang/Object) org/jruby/runtime/builtin/IRubyObject) @@ -695,7 +695,7 @@ (exception: (cannot_apply_a_non_function [object java/lang/Object]) (exception.report - ["Non-function" (ffi.of_string (java/lang/Object::toString object))])) + "Non-function" (ffi.of_string (java/lang/Object::toString object)))) (def: macro! (-> Macro (Maybe org/jruby/RubyProc)) @@ -776,8 +776,8 @@ (for @.jvm (as_is (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))])) + "Partial Application" (%.nat (list.size partial_application)) + "Arity" (%.nat (list.size arity)))) (def: proc_type org/jruby/runtime/Block$Type |