Derecho  0.9
Distributed systems toolkit for RDMA
derecho_exception.hpp
Go to the documentation of this file.
1 
7 #pragma once
8 
10 #include <exception>
11 #include <sstream>
12 #include <string>
13 
14 namespace derecho {
15 
19 struct derecho_exception : public std::exception {
20  const std::string message;
21  derecho_exception(const std::string& message)
22  : message(message + " Derecho version: " + VERSION_STRING_PLUS_COMMITS) {}
23 
24  const char* what() const noexcept {
25  return message.c_str();
26  }
27 };
28 
34  empty_reference_exception(const std::string& message) : derecho_exception(message) {}
35 };
36 
42  invalid_subgroup_exception(const std::string& message) : derecho_exception(message) {}
43 };
44 
51  invalid_node_exception(const std::string& message) : derecho_exception(message) {}
52 };
53 } // namespace derecho
invalid_node_exception(const std::string &message)
const char * what() const noexcept
Exception that means the user requested an operation targeting a specific node and that node was not ...
empty_reference_exception(const std::string &message)
const char * VERSION_STRING_PLUS_COMMITS
A constant C-style string containing the current Derecho library version in dot-separated format...
Definition: git_version.cpp:42
Exception that means a reference-like type is "empty" (does not contain a valid object).
derecho_exception(const std::string &message)
Base exception class for all exceptions raised by Derecho.
Exception that means the user made an invalid request for a subgroup handle, such as by supplying an ...
invalid_subgroup_exception(const std::string &message)