mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
vim-patch:8.2.2857: Vim9: exception in ISN_INSTR caught at wrong level (#23131)
Problem: Vim9: exception in ISN_INSTR caught at wrong level.
Solution: Set the starting trylevel in exec_instructions(). (closes vim/vim#8214)
ff65288aa8
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
parent
b0978fca6b
commit
fd68cd1c0a
@ -890,7 +890,7 @@ EXTERN const char e_invarg2[] INIT(= N_("E475: Invalid argument: %s"));
|
||||
EXTERN const char e_invargval[] INIT(= N_("E475: Invalid value for argument %s"));
|
||||
EXTERN const char e_invargNval[] INIT(= N_("E475: Invalid value for argument %s: %s"));
|
||||
EXTERN const char e_duparg2[] INIT(= N_("E983: Duplicate argument: %s"));
|
||||
EXTERN const char e_invexpr2[] INIT(= N_("E15: Invalid expression: %s"));
|
||||
EXTERN const char e_invexpr2[] INIT(= N_("E15: Invalid expression: \"%s\""));
|
||||
EXTERN const char e_invrange[] INIT(= N_("E16: Invalid range"));
|
||||
EXTERN const char e_invcmd[] INIT(= N_("E476: Invalid command"));
|
||||
EXTERN const char e_isadir2[] INIT(= N_("E17: \"%s\" is a directory"));
|
||||
|
@ -63,6 +63,6 @@ describe('Test for delete()', function()
|
||||
|
||||
it('gives correct emsgs', function()
|
||||
eq('Vim(call):E474: Invalid argument', exc_exec("call delete('')"))
|
||||
eq('Vim(call):E15: Invalid expression: 0', exc_exec("call delete('foo', 0)"))
|
||||
eq('Vim(call):E15: Invalid expression: "0"', exc_exec("call delete('foo', 0)"))
|
||||
end)
|
||||
end)
|
||||
|
@ -103,9 +103,9 @@ describe('luaeval(vim.api.…)', function()
|
||||
eq(NIL, funcs.luaeval('vim.api.nvim__id(nil)'))
|
||||
|
||||
-- API strings from Blobs can work as NUL-terminated C strings
|
||||
eq('Vim(call):E5555: API call: Vim:E15: Invalid expression: ',
|
||||
eq('Vim(call):E5555: API call: Vim:E15: Invalid expression: ""',
|
||||
exc_exec('call nvim_eval(v:_null_blob)'))
|
||||
eq('Vim(call):E5555: API call: Vim:E15: Invalid expression: ',
|
||||
eq('Vim(call):E5555: API call: Vim:E15: Invalid expression: ""',
|
||||
exc_exec('call nvim_eval(0z)'))
|
||||
eq(1, eval('nvim_eval(0z31)'))
|
||||
|
||||
|
@ -539,11 +539,11 @@ describe('v:lua', function()
|
||||
end)
|
||||
|
||||
it('throw errors for invalid use', function()
|
||||
eq('Vim(let):E15: Invalid expression: v:lua.func', pcall_err(command, "let g:Func = v:lua.func"))
|
||||
eq('Vim(let):E15: Invalid expression: v:lua', pcall_err(command, "let g:Func = v:lua"))
|
||||
eq("Vim(let):E15: Invalid expression: v:['lua']", pcall_err(command, "let g:Func = v:['lua']"))
|
||||
eq([[Vim(let):E15: Invalid expression: "v:lua.func"]], pcall_err(command, "let g:Func = v:lua.func"))
|
||||
eq([[Vim(let):E15: Invalid expression: "v:lua"]], pcall_err(command, "let g:Func = v:lua"))
|
||||
eq([[Vim(let):E15: Invalid expression: "v:['lua']"]], pcall_err(command, "let g:Func = v:['lua']"))
|
||||
|
||||
eq("Vim:E15: Invalid expression: v:['lua'].foo()", pcall_err(eval, "v:['lua'].foo()"))
|
||||
eq([[Vim:E15: Invalid expression: "v:['lua'].foo()"]], pcall_err(eval, "v:['lua'].foo()"))
|
||||
eq("Vim(call):E461: Illegal variable name: v:['lua']", pcall_err(command, "call v:['lua'].baar()"))
|
||||
eq("Vim:E1085: Not a callable type: v:lua", pcall_err(eval, "v:lua()"))
|
||||
|
||||
@ -554,6 +554,6 @@ describe('v:lua', function()
|
||||
eq("Vim:E274: No white space allowed before parenthesis", pcall_err(eval, "'bad'->v:lua.func ()"))
|
||||
eq("Vim:E107: Missing parentheses: v:lua", pcall_err(eval, "'bad'->v:lua"))
|
||||
eq("Vim:E1085: Not a callable type: v:lua", pcall_err(eval, "'bad'->v:lua()"))
|
||||
eq("Vim:E15: Invalid expression: v:lua.()", pcall_err(eval, "'bad'->v:lua.()"))
|
||||
eq([[Vim:E15: Invalid expression: "v:lua.()"]], pcall_err(eval, "'bad'->v:lua.()"))
|
||||
end)
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user