[clangd] Fix missing "message" key when responding with unsupported method
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 25 Sep 2017 17:16:47 +0000 (17:16 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 25 Sep 2017 17:16:47 +0000 (17:16 +0000)
commit9297af60db0945f05e26ce872daa24bff42155be
tree07b6d15a597d0252ac948c25b02a3ccd66457355
parentaa7f750becff41e71d29865b28d7b94d25785564
[clangd] Fix missing "message" key when responding with unsupported method

The language server protocol dictates that a ResponseError should have a
[message string][1] describing the error. This adds a simple message to the
error and a simple test.

[1]: https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#response-message

Patch by Raoul Wols!

Differential Revision: https://reviews.llvm.org/D38225

llvm-svn: 314119
clang-tools-extra/clangd/JSONRPCDispatcher.cpp
clang-tools-extra/test/clangd/unsupported-method.test [new file with mode: 0644]