9 #ifndef LIBPMEMOBJ_CPP_PEXCEPTIONS_HPP
10 #define LIBPMEMOBJ_CPP_PEXCEPTIONS_HPP
14 #include <system_error>
16 #include <libpmemobj/atomic_base.h>
17 #include <libpmemobj/base.h>
32 return std::string(pmemobj_errormsgU());
34 return std::string(pmemobj_errormsg());
47 using std::runtime_error::runtime_error;
50 with_pmemobj_errormsg()
52 (*this) =
pool_error(what() + std::string(
": ") +
65 using pool_error::pool_error;
68 with_pmemobj_errormsg()
83 using std::runtime_error::runtime_error;
86 with_pmemobj_errormsg()
102 using std::system_error::system_error;
105 with_pmemobj_errormsg()
108 what() + std::string(
": ") +
121 using transaction_error::transaction_error;
124 with_pmemobj_errormsg()
138 public std::bad_alloc {
140 using transaction_alloc_error::transaction_alloc_error;
141 using transaction_alloc_error::what;
144 with_pmemobj_errormsg()
147 transaction_alloc_error::what() + std::string(
": ") +
160 using transaction_alloc_error::transaction_alloc_error;
163 with_pmemobj_errormsg()
178 using std::logic_error::logic_error;
188 using std::runtime_error::runtime_error;
198 using std::runtime_error::runtime_error;
208 using std::runtime_error::runtime_error;
211 with_pmemobj_errormsg()
213 (*this) =
ctl_error(what() + std::string(
": ") +
227 using std::runtime_error::runtime_error;
235 with_pmemobj_errormsg()
238 what() + std::string(
": ") +
Custom ctl error class.
Definition: pexceptions.hpp:206
Custom defrag error class.
Definition: pexceptions.hpp:225
pobj_defrag_result result
Results of the defragmentation run.
Definition: pexceptions.hpp:249
Custom layout error class.
Definition: pexceptions.hpp:196
Custom lock error class.
Definition: pexceptions.hpp:100
Custom transaction error class.
Definition: pexceptions.hpp:186
Custom pool error class.
Definition: pexceptions.hpp:45
Custom pool error class.
Definition: pexceptions.hpp:63
Custom transaction error class.
Definition: pexceptions.hpp:119
Custom transaction error class.
Definition: pexceptions.hpp:81
Custom transaction error class.
Definition: pexceptions.hpp:158
Custom out of memory error class.
Definition: pexceptions.hpp:138
Custom transaction error class.
Definition: pexceptions.hpp:176
std::string errormsg(void)
Return last libpmemobj error message as a std::string.
Definition: pexceptions.hpp:29
Persistent memory namespace.
Definition: allocation_flag.hpp:15