mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
exception.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <exception>
4#include <string>
5
6
7namespace m {
8
9struct exception : std::exception
10{
11 private:
12 const std::string message_;
13
14 public:
15 explicit exception(std::string message) : message_(std::move(message)) { }
16
17 const char * what() const noexcept override { return message_.c_str(); }
18};
19
25{
26 explicit logic_error(std::string message) : exception(std::move(message)) { }
27};
28
31{
32 explicit invalid_state(std::string message) : logic_error(std::move(message)) { }
33};
34
37{
38 explicit invalid_argument(std::string message) : logic_error(std::move(message)) { }
39};
40
43{
44 explicit out_of_range(std::string message) : logic_error(std::move(message)) { }
45};
46
49{
50 explicit runtime_error(std::string message) : exception(std::move(message)) { }
51};
52
54{
55 explicit frontend_exception(std::string message) : exception(std::move(message)) { }
56};
57
59{
60 explicit backend_exception(std::string message) : exception(std::move(message)) { }
61};
62
63}
‍mutable namespace
Definition: Backend.hpp:10
STL namespace.
backend_exception(std::string message)
Definition: exception.hpp:60
const char * what() const noexcept override
Definition: exception.hpp:17
exception(std::string message)
Definition: exception.hpp:15
const std::string message_
Definition: exception.hpp:12
frontend_exception(std::string message)
Definition: exception.hpp:55
Signals that an argument to a function of method was invalid.
Definition: exception.hpp:37
invalid_argument(std::string message)
Definition: exception.hpp:38
Signals that an object was in an invalid state when a method was invoked.
Definition: exception.hpp:31
invalid_state(std::string message)
Definition: exception.hpp:32
Base class for exceptions signaling an error in the logic.
Definition: exception.hpp:25
logic_error(std::string message)
Definition: exception.hpp:26
Signals that an index-based or key-based access was out of range.
Definition: exception.hpp:43
out_of_range(std::string message)
Definition: exception.hpp:44
Signals a runtime error that mu*t*able is not responsible for and that mu*t*able was not able to reco...
Definition: exception.hpp:49
runtime_error(std::string message)
Definition: exception.hpp:50