even more strict isNil handling for strings/seqs in order to detect bugs

This commit is contained in:
Araq 2018-08-22 12:35:46 +02:00
commit 64517445ea
36 changed files with 193 additions and 245 deletions

View file

@ -232,7 +232,7 @@ template run_custom_proc(parsed_parameter: Tparsed_parameter,
if not custom_validator.isNil:
try:
let message = custom_validator(parameter, parsed_parameter)
if not message.isNil and message.len > 0:
if message.len > 0:
raise_or_quit(ValueError, ("Failed to validate value for " &
"parameter $1:\n$2" % [escape(parameter), message]))
except: