0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.2.1854: Vim9: crash when throwing exception for NULL string

Problem:    Vim9: crash when throwing exception for NULL string. (Dhiraj
            Mishra)
Solution:   Handle NULL string like empty string. (closes #7139)
This commit is contained in:
Bram Moolenaar
2020-10-16 20:25:23 +02:00
parent 7a66a17190
commit 1e021e63c5
4 changed files with 28 additions and 0 deletions

View File

@@ -617,6 +617,21 @@ def Test_throw_vimscript()
endtry
END
CheckScriptSuccess(lines)
lines =<< trim END
vim9script
def Func()
throw @r
enddef
var result = ''
try
Func()
catch /E1129:/
result = 'caught'
endtry
assert_equal('caught', result)
END
CheckScriptSuccess(lines)
enddef
def Test_error_in_nested_function()