From e5625dd840a8b8adc76987f649da254335d3d93a Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 11 Aug 2022 16:50:42 -0400 Subject: Improved exception-definition macro. --- lux-php/source/program.lux | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lux-php/source') 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)]))) -- cgit v1.2.3