0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.2.2141: a user command with try/catch may not catch an expression error

Problem:    A user command with try/catch may not catch an expression error.
Solution:   When an expression fails check for following "|". (closes #7469)
This commit is contained in:
Bram Moolenaar
2020-12-13 20:26:29 +01:00
parent 2a3cd3af45
commit 8143a53c53
4 changed files with 34 additions and 4 deletions

View File

@@ -6825,7 +6825,7 @@ func Test_script_lines()
\ ])
call assert_report("Shouldn't be able to define function")
catch
call assert_exception('Vim(function):E126: Missing :endfunction')
call assert_exception('Vim(function):E1145: Missing heredoc end marker: .')
endtry
" :change
@@ -6845,7 +6845,7 @@ func Test_script_lines()
\ ])
call assert_report("Shouldn't be able to define function")
catch
call assert_exception('Vim(function):E126: Missing :endfunction')
call assert_exception('Vim(function):E1145: Missing heredoc end marker: .')
endtry
" :insert
@@ -6865,7 +6865,7 @@ func Test_script_lines()
\ ])
call assert_report("Shouldn't be able to define function")
catch
call assert_exception('Vim(function):E126: Missing :endfunction')
call assert_exception('Vim(function):E1145: Missing heredoc end marker: .')
endtry
endfunc