add service name
This commit is contained in:
@@ -22,9 +22,10 @@ namespace hack
|
|||||||
~exception() = default;
|
~exception() = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void message(const std::string v) noexcept { m_message = v; };
|
void message(const std::string v) noexcept { m_message = v; }
|
||||||
void description(const std::string v) noexcept { m_description = v; };
|
void description(const std::string v) noexcept { m_description = v; }
|
||||||
void system_error(const std::exception& e) noexcept { m_system_error = e.what(); };
|
void system_error(const std::exception& e) noexcept { m_system_error = e.what(); }
|
||||||
|
void service(const std::string v) noexcept { m_service = v; }
|
||||||
|
|
||||||
template<typename Param>
|
template<typename Param>
|
||||||
void params(std::string key, Param value) { m_params[key] = value; }
|
void params(std::string key, Param value) { m_params[key] = value; }
|
||||||
@@ -68,7 +69,8 @@ namespace hack
|
|||||||
j["system_error"] = m_system_error;
|
j["system_error"] = m_system_error;
|
||||||
j["location"] = m_location.file_name();
|
j["location"] = m_location.file_name();
|
||||||
j["params"] = m_params;
|
j["params"] = m_params;
|
||||||
j["msg_to_front"] = m_message;
|
j["message"] = m_message;
|
||||||
|
j["service"] = m_service;
|
||||||
|
|
||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
@@ -77,6 +79,7 @@ namespace hack
|
|||||||
std::string m_message { "no valid data" };
|
std::string m_message { "no valid data" };
|
||||||
std::string m_description;
|
std::string m_description;
|
||||||
std::string m_system_error;
|
std::string m_system_error;
|
||||||
|
std::string m_service;
|
||||||
std::experimental::source_location m_location;
|
std::experimental::source_location m_location;
|
||||||
JSON m_params;
|
JSON m_params;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user