lintel 0.2.0
Loading...
Searching...
No Matches
ShmSegmentNotFound.h
Go to the documentation of this file.
1#ifndef LINTEL_SHMSEGMENTNOTFOUND_H
2#define LINTEL_SHMSEGMENTNOTFOUND_H
3
4#include <exception>
5#include <string>
6
7namespace lintel {
9class ShmSegmentNotFound : public std::exception
10{
11private:
12 std::string name;
13 std::string message;
14
15public:
17 explicit ShmSegmentNotFound(const std::string_view &name)
18 : name(name), message(this->name + ": segment not constructed in SharedMemoryService")
19 {}
20
22 [[nodiscard]] const std::string &getName() const { return name; }
23
24 [[nodiscard]] const char *what() const noexcept override { return message.c_str(); };
25};
26
27}// namespace lintel
28#endif// LINTEL_SHMSEGMENTNOTFOUND_H
Definition ShmSegmentNotFound.h:10
const char * what() const noexcept override
Definition ShmSegmentNotFound.h:24
const std::string & getName() const
Definition ShmSegmentNotFound.h:22
ShmSegmentNotFound(const std::string_view &name)
Definition ShmSegmentNotFound.h:17
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9