Error represents an error message in response to a DAP request.
| 36 | |
| 37 | // Error represents an error message in response to a DAP request. |
| 38 | struct Error { |
| 39 | Error() = default; |
| 40 | Error(const std::string& error); |
| 41 | Error(const char* msg, ...); |
| 42 | |
| 43 | // operator bool() returns true if there is an error. |
| 44 | inline operator bool() const { return message.size() > 0; } |
| 45 | |
| 46 | std::string message; // empty represents success. |
| 47 | }; |
| 48 | |
| 49 | //////////////////////////////////////////////////////////////////////////////// |
| 50 | // ResponseOrError<T> |