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. --- stdlib/source/program/aedifex/hash.lux | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'stdlib/source/program/aedifex/hash.lux') diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux index eedf5e464..64e9784d3 100644 --- a/stdlib/source/program/aedifex/hash.lux +++ b/stdlib/source/program/aedifex/hash.lux @@ -81,15 +81,16 @@ (def hex_per_chunk (n.* hex_per_byte i64.bytes_per_i64)) - (exception .public (not_a_hash [size Nat - value Text]) + (exception.def .public (not_a_hash [size value]) + (Exception [Nat Text]) (exception.report (list ["Pseudo hash" (%.text value)] ["Expected size" (%.nat size)] ["Actual size" (%.nat (text.size value))]))) (with_template [ ] - [(exception .public ( [data Binary]) + [(exception.def .public ( data) + (Exception Binary) (exception.report (list ["Pseudo hash" (%.text (..encoded data))] ["Expected size" (%.nat )] -- cgit v1.2.3