vim-denops / denops.vim

🐜 An ecosystem of Vim/Neovim which allows developers to write cross-platform plugins in Deno
https://vim-denops.github.io/denops-documentation/
MIT License
666 stars 33 forks source link

`denops#server#close()` throws an error if channel does not exist #337

Closed Milly closed 4 months ago

Milly commented 4 months ago

denops#server#close() throws an error if the channel does not yet exist. But it is expected that it should not throw an error.

Document says following: https://github.com/vim-denops/denops.vim/blob/c727a3f05a804d1f04b11735f8241518465de9a7/doc/denops.txt#L237-L240

Actual

Call denops#server#close() then outputs:

Error detected while processing function denops#server#close[1]..denops#_internal#server#chan#close[2]..function denops#server#close[1]..denops#_internal#server#chan#close:
line    2:
E605: Exception not caught: [denops] Channel does not exist yet

Expected

No errors occurred.

Additional information

Similar item denops#server#stop() is also says "It does nothing when ...": https://github.com/vim-denops/denops.vim/blob/c727a3f05a804d1f04b11735f8241518465de9a7/doc/denops.txt#L215-L218

And it doesn't throw any errors.