Patryk Osmaczko c0024ec6b1 refactor(@desktop/cpp): improve cpp code
Good coding practices applied only,
architecture and logic were not altered.
2022-03-01 16:05:21 +01:00

19 lines
446 B
C++

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