callable strikes again.
This commit is contained in:
parent
67de7e422d
commit
75c1e87470
@ -266,7 +266,7 @@ flag_define(FlagName, FlagGroup, FlagType, DefaultValue, Description, Access, MH
|
||||
throw(error(domain_error(access, Access), message('Wrong access attribute, available are: read_write, read_only, hidden, hidden_read_only.', flag_define(FlagName, FlagGroup, FlagType, DefaultValue, Description, Access, Module:Handler))))
|
||||
; \+ callable(Handler) ->
|
||||
strip_module(Handler, Mod, G),
|
||||
throw(error(type_error(callable, G/0), message('Flag handler needs to be callable.', flag_define(FlagName, FlagGroup, FlagType, DefaultValue, Description, Access, Module:Handler))))
|
||||
throw(error(type_error(callable, G), message('Flag handler needs to be callable.', flag_define(FlagName, FlagGroup, FlagType, DefaultValue, Description, Access, Module:Handler))))
|
||||
;
|
||||
validate(FlagType, Module:Handler, DefaultValue, FlagName),
|
||||
assertz('$defined_flag$'(FlagName, FlagGroup, FlagType, DefaultValue, Description, Access, Module:Handler)),
|
||||
|
Reference in New Issue
Block a user