24 #ifndef LIBTHREADAR_EXCEPTIONS_HPP
25 #define LIBTHREADAR_EXCEPTIONS_HPP
116 unsigned int size()
const {
return msg_table.size(); };
122 const std::string &
operator [](
unsigned int i)
const {
return msg_table[i]; };
128 std::string
get_message(
const std::string & sep)
const;
141 std::vector<std::string> msg_table;
146 template<
class T> exception_base *
cloner(
void *
const ptr);
164 #define THREADAR_BUG exception_bug(__FILE__, __LINE__)
172 exception_bug(
const std::string & file,
int line) :
exception_base(
"LIBTHREADAR BUG MET IN File " + file +
" line " + std::to_string(line)) {};
exception_base * cloner(void *const ptr)
Template used by libthreadar to implement the clone() method for libthreadar exceptions.
Exception used to report webdar internal bugs.
unsigned int size() const
for site which need to display the information to the user
virtual exception_base * clone() const
create a new object of the same type and value of the object which clone() method is invoked ...
virtual exception_base * clone() const
create a new object of the same type and value of the object which clone() method is invoked ...
Exception used to report error met when manipulating threads.
Exception used to report an non-implemented feature.
Exception used to report memory allocation failures.
virtual exception_base * clone() const
create a new object of the same type and value of the object which clone() method is invoked ...
exception_base(const std::string &x_msg)
constructor
Exception used to report operating system errors.
const std::string & operator[](unsigned int i) const
for site which need to display the information to the user
Pure virtual class parent of all libthreadar exceptions.
void push_message(const std::string &x_msg)
to be used in a catch clause to add context information before rethrowing the exception ...
virtual exception_base * clone() const
create a new object of the same type and value of the object which clone() method is invoked ...
std::string get_message(const std::string &sep) const
concatenated messages and use the given separator between messages
virtual exception_base * clone() const
create a new object of the same type and value of the object which clone() method is invoked ...
virtual exception_base * clone() const =0
create a new object of the same type and value of the object which clone() method is invoked ...
virtual exception_base * clone() const
create a new object of the same type and value of the object which clone() method is invoked ...
This is the only namespace used in libthreadar and all symbols provided by libthreadar are member of ...
void reset_first_message(const std::string &msg)
for libthreader internal use only
Exception used to report out or range value or argument.