status-desktop/src-cpp/backend/types.cpp

19 lines
446 B
C++
Raw Normal View History

2022-01-06 19:29:19 +00:00
#include "backend/types.h"
#include <QString>
2022-01-06 19:29:19 +00:00
std::ostream& operator<<(std::ostream& os, const Backend::RpcError& r)
2022-01-06 19:29:19 +00:00
{
return (os << "RpcError(\n code: " << r.m_code << "\n message: " << r.m_message.toStdString() << "\n)"
<< std::endl);
2022-01-06 19:29:19 +00:00
}
Backend::RpcException::RpcException(const std::string& message)
: m_message(message)
2022-01-06 19:29:19 +00:00
{ }
const char* Backend::RpcException::what() const noexcept
2022-01-06 19:29:19 +00:00
{
return m_message.c_str();
}