Merge pull request #656 from notoria/try_from_number

Fixed some conversion issues
This commit is contained in:
Mark Thom
2020-08-08 12:24:29 -03:00
committed by GitHub
2 changed files with 13 additions and 0 deletions

View File

@@ -918,6 +918,7 @@ op(Priority, OpSpec, Op) :-
halt :- halt(0).
halt(N) :-
must_be_number(N, halt/1),
( -2^31 =< N, N =< 2^31 - 1 ->
'$halt'(N)
; throw(error(domain_error(exit_code, N), halt/1))