callable strikes again.

This commit is contained in:
Vitor Santos Costa 2014-10-20 15:44:13 +01:00
parent 67de7e422d
commit 75c1e87470
1 changed files with 1 additions and 1 deletions

View File

@ -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)),