Elma
An event loop manager for embedded systems
exceptions.h
1 #ifndef _ELMA_EXCEPTIONS_H
2 #define _ELMA_EXCEPTIONS_H
3 
4 #include <stdexcept>
5 #include <string>
6 
7 namespace elma {
8 
10 
13  class Exception : public std::runtime_error {
14 
15  public:
16  Exception(const std::string& what) :
17  runtime_error(what),
18  _what("Elma Error: " + what) {}
19 
20  const char* what() const throw (){
21  return _what.c_str();
22  }
23 
24  private:
25  std::string _what;
26 
27  };
28 
29 }
30 
31 #endif
An exception class for Elma.
Definition: exceptions.h:13
Definition: channel.cc:5