2022-01-06 19:29:19 +00:00
|
|
|
#include "backend/types.h"
|
|
|
|
|
2022-02-22 08:02:34 +00:00
|
|
|
#include <QString>
|
2022-01-06 19:29:19 +00:00
|
|
|
|
2022-02-22 08:02:34 +00:00
|
|
|
std::ostream& operator<<(std::ostream& os, const Backend::RpcError& r)
|
2022-01-06 19:29:19 +00:00
|
|
|
{
|
2022-02-21 18:03:38 +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)
|
2022-02-21 18:03:38 +00:00
|
|
|
: m_message(message)
|
2022-01-06 19:29:19 +00:00
|
|
|
{ }
|
|
|
|
|
2022-02-22 08:02:34 +00:00
|
|
|
const char* Backend::RpcException::what() const noexcept
|
2022-01-06 19:29:19 +00:00
|
|
|
{
|
2022-02-21 18:03:38 +00:00
|
|
|
return m_message.c_str();
|
|
|
|
}
|