mirror of
https://github.com/vim/vim.git
synced 2025-10-03 05:14:07 -04:00
patch 8.2.4358: Vim9: line number of exception is not set
Problem: Vim9: line number of exception is not set. Solution: Set the line number before throwing an exception. (closes #9755)
This commit is contained in:
@@ -1057,6 +1057,18 @@ def Test_try_catch_skipped()
|
||||
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()
|
||||
|
Reference in New Issue
Block a user