Problem: Vim9: line number of exception is not set.
Solution: Set the line number before throwing an exception. (closes #9755)
assert_match("NEWLIST size 0\n", instr)
enddef
+def Test_throw_line_number()
+ def Func()
+ eval 1 + 1
+ eval 2 + 2
+ throw 'exception'
+ enddef
+ try
+ Func()
+ catch /exception/
+ assert_match('line 3', v:throwpoint)
+ endtry
+enddef
def Test_throw_vimscript()
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 4358,
/**/
4357,
/**/
}
}
+ SOURCING_LNUM = iptr->isn_lnum;
if (throw_exception(tv->vval.v_string, ET_USER, NULL)
== FAIL)
{