aboutsummaryrefslogtreecommitdiff
path: root/lux-r
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-r
parent0c32c7f03ad1f8f0db54b623dc407713bbf8cacd (diff)
Made exception.report a function.
Diffstat (limited to '')
-rw-r--r--lux-r/source/program.lux10
-rw-r--r--lux-ruby/source/program.lux32
2 files changed, 21 insertions, 21 deletions
diff --git a/lux-r/source/program.lux b/lux-r/source/program.lux
index c021c1908..7cb8645f7 100644
--- a/lux-r/source/program.lux
+++ b/lux-r/source/program.lux
@@ -173,8 +173,8 @@
(with_template [<name>]
[(exception (<name> [object java/lang/Object])
(exception.report
- "Class" (java/lang/Object::toString (java/lang/Object::getClass object))
- "Object" (java/lang/Object::toString object)))]
+ (list ["Class" (java/lang/Object::toString (java/lang/Object::getClass object))]
+ ["Object" (java/lang/Object::toString object)])))]
[unknown_kind_of_object]
[cannot_apply_a_non_function]
@@ -233,9 +233,9 @@
... org/renjin/sexp/SEXP
... (exec
... ("lux io log" (exception.report
- ... "@@" "eval"
- ... "context" (debug.inspect context)
- ... "environment" (debug.inspect environment)))
+ ... (list ["@@" "eval"]
+ ... ["context" (debug.inspect context)]
+ ... ["environment" (debug.inspect environment)])))
... self))
... (org/renjin/sexp/AbstractSEXP
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