mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 9.0.0335: checks for Dictionary argument often give a vague error
Problem: Checks for Dictionary argument often give a vague error message. Solution: Give a useful error message. (Yegappan Lakshmanan, closes #11009)
This commit is contained in:
committed by
Bram Moolenaar
parent
f240395fca
commit
04c4c5746e
@@ -872,12 +872,10 @@ f_timer_start(typval_T *argvars, typval_T *rettv)
|
||||
msec = (long)tv_get_number(&argvars[0]);
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
if (argvars[2].v_type != VAR_DICT
|
||||
|| (dict = argvars[2].vval.v_dict) == NULL)
|
||||
{
|
||||
semsg(_(e_invalid_argument_str), tv_get_string(&argvars[2]));
|
||||
if (check_for_nonnull_dict_arg(argvars, 2) == FAIL)
|
||||
return;
|
||||
}
|
||||
|
||||
dict = argvars[2].vval.v_dict;
|
||||
if (dict_has_key(dict, "repeat"))
|
||||
repeat = dict_get_number(dict, "repeat");
|
||||
}
|
||||
|
Reference in New Issue
Block a user