Christian wrote:
> while debugging the xdiff test, I stumbled about the error message
> E685: Internal error: set_var()
>
> That was me, trying to clear v:errors, but unfortunately I thought
> v:errors are of type string, while it is a list type. So the first time
> :let v:errors=''
> failed with the above error, while on the next try, it actually
> succeeded. That is actually a bit confusing and just after hunting the
> set_var() message, I actually found out what I did wrong :(
>
> So can we please make this something more obvious, e.g. like this:
>
> diff --git a/src/eval.c b/src/eval.c
> index 7dfb98125..dd0164f04 100644
> --- a/src/eval.c
> +++ b/src/eval.c
> @@ -7568,7 +7568,10 @@ set_var(
> return;
> }
> else if (v->di_tv.v_type != tv->v_type)
> - internal_error("set_var()");
> + {
> + internal_error("set_var(): wrong type!");
> + return;
> + }
> }
>
> clear_tv(&v->di_tv);
Since you trigger the error with a normal command, it should not be an
internal error. Let's make it a normal error message, with a number you
can search for in the help.
--
SOLDIER: Where did you get the coconuts?
ARTHUR: Through ... We found them.
SOLDIER: Found them? In Mercea. The coconut's tropical!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.