41#define BES_INTERNAL_ERROR 1
47#define BES_INTERNAL_FATAL_ERROR 2
49#define BES_SYNTAX_USER_ERROR 3
50#define BES_FORBIDDEN_ERROR 4
51#define BES_NOT_FOUND_ERROR 5
54#define BES_TIMEOUT_ERROR 6
61 std::string _msg {
"UNDEFINED"};
62 unsigned int _type {0};
64 unsigned int _line {0};
80 BESError(std::string msg,
unsigned int type, std::string file,
unsigned int line) :
81 _msg(std::move(msg)), _type(type), _file(std::move(file)), _line(line)
89 : exception(), _msg(src._msg), _type(src._type), _file(src._file), _line(src._line) { }
135 virtual std::string get_verbose_message()
const;
168 const char*
what() const noexcept
override {
176 void dump(std::ostream &strm)
const override;
Base exception class for the BES with basic string message.
BESError & operator=(const BESError &rhs)=delete
BESError(std::string msg, unsigned int type, std::string file, unsigned int line)
constructor that takes message, type of error, source file the error originated and the line number i...
unsigned int get_line() const
get the line number where the exception was thrown
BESError(const BESError &src) noexcept
unsigned int get_bes_error_type() const
Return the return code for this error class.
void dump(std::ostream &strm) const override
Displays debug information about this object.
const char * what() const noexcept override
Return a brief message about the exception.
std::string get_file() const
get the file name where the exception was thrown
std::string get_message() const
get the error message for this exception
void set_bes_error_type(unsigned int type)
Set the return code for this particular error class.
void set_message(const std::string &msg)
set the error message for this exception
top level BES object to house generic methods