ErrorAwaiter.cpp
Go to the documentation of this file.
2 #include <swarmio/Exception.h>
3 
4 using namespace swarmio;
5 using namespace swarmio::services;
6 
7 bool ErrorAwaiter::ExtractResponse(const Node* node, const data::Message* message)
8 {
9  if (message->content_case() == data::Message::ContentCase::kError)
10  {
11  return message->error() == data::Error::NONE;
12  }
13  else
14  {
15  throw Exception("Invalid response type");
16  }
17 }
virtual bool ExtractResponse(const Node *node, const data::Message *message) override
Called when a response for the original message has been received.
Definition: ErrorAwaiter.cpp:7
Exception class thrown by all library classes.
Represents a Node the Endpoint knows about and can send messages to.


swarmros
Author(s):
autogenerated on Fri Apr 3 2020 03:42:48