libswarmio/include/swarmio/Exception.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <exception>
4 #include <string>
5 
6 namespace swarmio
7 {
12  class SWARMIO_API Exception : public std::exception
13  {
14  private:
15 
20  std::string _message;
21 
22  public:
23 
29  Exception(const char* message)
30  : _message(message) { }
31 
37  const char* what() const noexcept override
38  {
39  return _message.c_str();
40  }
41  };
42 }
Exception class thrown by all library classes.
const char * what() const noexceptoverride
Get the error message.
std::string _message
The buffer where the message is stored.
Exception(const char *message)
Construct a new Exception.


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