RPC: turn errors from async calls into notifications

Previously, nvim sent a response with invalid request id (UINT64_MAX).
In functionaltests, catch unexpected error notifications in after_each().
This commit is contained in:
Björn Linse
2018-12-01 16:44:36 +01:00
parent 07ad5d71ab
commit 8b42249cdd
5 changed files with 45 additions and 3 deletions

View File

@@ -757,6 +757,14 @@ return function(after_each)
end
check_logs()
check_cores('build/bin/nvim')
if session then
local msg = session:next_message(0)
if msg then
if msg[1] == "notification" and msg[2] == "nvim_error_event" then
error(msg[3][2])
end
end
end
end)
end
return module