diff options
author | Eduardo Julian | 2022-08-11 16:50:42 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-08-11 16:50:42 -0400 |
commit | e5625dd840a8b8adc76987f649da254335d3d93a (patch) | |
tree | fb672669383525d90d462edf8c141f98bc953894 /lux-php/source | |
parent | 065e8a4d8122d4616b570496915d2c0e2c78cd6b (diff) |
Improved exception-definition macro.
Diffstat (limited to '')
-rw-r--r-- | lux-php/source/program.lux | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lux-php/source/program.lux b/lux-php/source/program.lux index 47edfa25c..94c4f9414 100644 --- a/lux-php/source/program.lux +++ b/lux-php/source/program.lux @@ -10,7 +10,7 @@ ["[0]" pipe] ["[0]" maybe] ["[0]" try (.only Try)] - ["[0]" exception (.only exception)] + ["[0]" exception (.only Exception)] ["[0]" io (.only IO io)] [concurrency ["[0]" promise (.only Promise)]]] @@ -181,7 +181,8 @@ (type Reader (-> java/lang/Object (Try Any))) -(exception (unknown_kind_of_object [object java/lang/Object]) +(exception.def (unknown_kind_of_object object) + (Exception java/lang/Object) (exception.report (list ["Class" (java/lang/Object::toString (java/lang/Object::getClass object))] ["Object" (java/lang/Object::toString object)]))) @@ -373,7 +374,7 @@ _ (exception.throw ..unknown_kind_of_object host_object))) -(exception .public nulll_has_no_lux_representation) +(exception.def .public nulll_has_no_lux_representation) (def tuple_size_field (php/runtime/memory/StringMemory::new runtime.tuple_size_field)) @@ -416,7 +417,8 @@ (exception.throw ..unknown_kind_of_object host_object) ))) -(exception (cannot_apply_a_non_function [object java/lang/Object]) +(exception.def (cannot_apply_a_non_function object) + (Exception java/lang/Object) (exception.report (list ["Class" (java/lang/Object::toString (java/lang/Object::getClass object))] ["Non-function" (java/lang/Object::toString object)]))) |