]> Repositorios git - scryer-prolog.git/commitdiff
Corrected the error being thrown by sleep/1
authornotoria <[email protected]>
Mon, 20 Apr 2020 14:34:56 +0000 (16:34 +0200)
committernotoria <[email protected]>
Mon, 20 Apr 2020 14:36:57 +0000 (16:36 +0200)
src/prolog/lib/time.pl

index 4d9442a01067830cec2a6d91a6d85ad28903a824..2c2b67c167b9bbb9f2a15f0853aae886aadf5871 100644 (file)
@@ -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)
     ).