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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user