Updated changelog entry

This commit is contained in:
Denis Chaplygin
2019-08-15 11:40:23 +03:00
parent ff46e98d21
commit a9c187c99b
39 changed files with 591 additions and 457 deletions
+10 -5
View File
@@ -64,17 +64,21 @@ class BasePlugin
return false;
}
struct ErrorRenderer {
struct ErrorRenderer
{
std::string code;
std::string message;
ErrorRenderer(std::string code, std::string message) : code(std::move(code)), message(std::move(message)) {};
ErrorRenderer(std::string code, std::string message)
: code(std::move(code)), message(std::move(message)){};
void operator()(util::json::Object& json_result) {
void operator()(util::json::Object &json_result)
{
json_result.values["code"] = code;
json_result.values["message"] = message;
};
void operator()(flatbuffers::FlatBufferBuilder& fb_result) {
void operator()(flatbuffers::FlatBufferBuilder &fb_result)
{
api::fbresult::FBResultBuilder error(fb_result);
error.add_error(true);
@@ -84,7 +88,8 @@ class BasePlugin
error.add_code(codeBuilder.Finish());
fb_result.Finish(error.Finish());
};
void operator()(std::string& str_result) {
void operator()(std::string &str_result)
{
str_result = str(boost::format("code=%1% message=%2%") % code % message);
};
};