24#ifndef LIBTHREADAR_EXCEPTIONS_HPP
25#define LIBTHREADAR_EXCEPTIONS_HPP
111 void push_message(
const std::string & x_msg) { msg_table.push_back(x_msg); };
116 unsigned int size()
const {
return msg_table.size(); };
122 const std::string &
operator [](
unsigned int i)
const {
return msg_table[i]; };
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)) {};
Pure virtual class parent of all libthreadar exceptions.
virtual exception_base * clone() const =0
create a new object of the same type and value of the object which clone() method is invoked
void reset_first_message(const std::string &msg)
for libthreader internal use only
exception_base(exception_base &&ref) noexcept=default
default move constructor is fine
std::string get_message(const std::string &sep) const
concatenated messages and use the given separator between messages
virtual ~exception_base()=default
destructor
unsigned int size() const
for site which need to display the information to the user
exception_base(const exception_base &ref)=default
default copy constructor is fine
exception_base(const std::string &x_msg)
constructor
const std::string & operator[](unsigned int i) const
for site which need to display the information to the user
void push_message(const std::string &x_msg)
to be used in a catch clause to more detailed information of the problem cause, before rethrowing the...
exception_base & operator=(const exception_base &ref)=default
default assignment operator is fine
Exception used to report webdar internal bugs.
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 an non-implemented feature.
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 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 used to report out or range value or argument.
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 operating system errors.
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.
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 ...
exception_base * cloner(void *const ptr)
Template used by libthreadar to implement the clone() method for libthreadar exceptions.