From: notoria Date: Mon, 20 Apr 2020 14:34:56 +0000 (+0200) Subject: Corrected the error being thrown by sleep/1 X-Git-Tag: v0.8.123~114^2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=6d7612ead68efba82f698f1f70172fa3d1acd701;p=scryer-prolog.git Corrected the error being thrown by sleep/1 --- diff --git a/src/prolog/lib/time.pl b/src/prolog/lib/time.pl index 4d9442a0..2c2b67c1 100644 --- a/src/prolog/lib/time.pl +++ b/src/prolog/lib/time.pl @@ -19,9 +19,9 @@ max_sleep_time(0xfffffffffffffbff). sleep(T) :- builtins:must_be_number(T, sleep), ( T < 0 -> - throw(domain_error(not_less_than_zero, T)) + throw(error(domain_error(not_less_than_zero, T), sleep/1)) ; max_sleep_time(N), T > N -> - throw(error(reprensentation_error(max_sleep_time), abolish/1)) + throw(error(reprensentation_error(max_sleep_time), sleep/1)) ; '$sleep'(T) ).