Fix xpc build after 777180a32b6107

This commit is contained in:
Nico Weber 2020-01-28 19:35:11 -05:00
parent ca2abea29a
commit 95cb22d0f9

View File

@ -37,7 +37,8 @@ json::Object encodeError(Error E) {
}
Error decodeError(const json::Object &O) {
std::string Msg = O.getString("message").getValueOr("Unspecified error");
std::string Msg =
std::string(O.getString("message").getValueOr("Unspecified error"));
if (auto Code = O.getInteger("code"))
return make_error<LSPError>(std::move(Msg), ErrorCode(*Code));
return make_error<StringError>(std::move(Msg), inconvertibleErrorCode());