From 3157baed83b7e94f2ff92e6fd97e85dab41a1c94 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 27 Aug 2019 05:19:36 +0200 Subject: API: TRY_WRAP() for "abort-causing non-exception errors" - Introduce TRY_WRAP() until we have an *architectural* solution. - TODO: bfredl idea: prepare error-handling at "top level" (nv_event). - nvim_paste(): Revert luaeval() hack (see parent commit). - With TRY_WRAP() in nvim_put(), 'nomodifiable' error now correctly "bubbles up". --- test/functional/api/vim_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/api') diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 884e07e2c5..647fab5c43 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -411,7 +411,7 @@ describe('API', function() end) it("fails if 'nomodifiable'", function() command('set nomodifiable') - expect_err([[Buffer is not 'modifiable']], request, + expect_err([[Vim:E21: Cannot make changes, 'modifiable' is off]], request, 'nvim_put', {'a','b'}, 'l', true, true) end) it('inserts text', function() -- cgit