TT Client Library 1.0.0
C++ library for Tandem Tales clients.
Loading...
Searching...
No Matches
Error.h
1#pragma once
2
3#include <tt/io/Message.h>
4
5#ifndef ERROR_H
6#define ERROR_H
7
8namespace tt {
16 class Error : public Message {
17 public:
19 std::string message;
20
21 Error() {}
22
23 std::string toString() const override;
24
25 std::string type() const override {
26 return "Error";
27 }
28 };
29
30 void from_json(const nlohmann::json& j, Error& msg);
31 void to_json(nlohmann::json& j, const Error& msg);
32}
33
34#endif
std::string message
A message explaining the error.
Definition Error.h:19
std::string toString() const override
Returns a string representation of this object.
Definition Error.cpp:5
std::string type() const override
Type used for JSON deserialization.
Definition Error.h:25
Message()
Constructs a message.
Definition Message.h:32
Tandem Tales is a platform that enables short, paired storytelling exercises between two agents over ...
Definition Client.h:22