revert throwing domain errors for unexpected forms of read-options (#2015)
This commit is contained in:
@@ -721,30 +721,9 @@ parse_read_term_options(Options, OptionValues, Stub) :-
|
|||||||
parse_options_list(Options, builtins:parse_read_term_options_, DefaultOptions, OptionValues, Stub).
|
parse_options_list(Options, builtins:parse_read_term_options_, DefaultOptions, OptionValues, Stub).
|
||||||
|
|
||||||
|
|
||||||
parse_read_term_options_(singletons(Vars), singletons-Vars) :-
|
parse_read_term_options_(singletons(Vars), singletons-Vars) :- !.
|
||||||
( ( var(Vars)
|
parse_read_term_options_(variables(Vars), variables-Vars) :- !.
|
||||||
; '$skip_max_list'(_, _, Vars, Rs),
|
parse_read_term_options_(variable_names(Vars), variable_names-Vars) :- !.
|
||||||
Rs == []
|
|
||||||
) ->
|
|
||||||
!
|
|
||||||
; throw(error(domain_error(read_option, singletons(Vars)), read_term/2))
|
|
||||||
).
|
|
||||||
parse_read_term_options_(variables(Vars), variables-Vars) :-
|
|
||||||
( ( var(Vars)
|
|
||||||
; '$skip_max_list'(_, _, Vars, Rs),
|
|
||||||
Rs == []
|
|
||||||
) ->
|
|
||||||
!
|
|
||||||
; throw(error(domain_error(read_option, variables(Vars)), read_term/2))
|
|
||||||
).
|
|
||||||
parse_read_term_options_(variable_names(Vars), variable_names-Vars) :-
|
|
||||||
( ( var(Vars)
|
|
||||||
; '$skip_max_list'(_, _, Vars, Rs),
|
|
||||||
Rs == []
|
|
||||||
) ->
|
|
||||||
!
|
|
||||||
; throw(error(domain_error(read_option, variable_names(Vars)), read_term/2))
|
|
||||||
).
|
|
||||||
parse_read_term_options_(E,_) :-
|
parse_read_term_options_(E,_) :-
|
||||||
throw(error(domain_error(read_option, E), _)).
|
throw(error(domain_error(read_option, E), _)).
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user