43 Exception(
const char* file,
size_t line,
const std::string&
what);
65 virtual const char*
what()
const throw();
75 virtual const
char*
what(
bool verbose) const throw();
85 const std::
string&
getMessage()
const {
return (what_); }
90 const char*
getFile()
const {
return (file_); }
95 size_t getLine()
const {
return (line_); }
101 const char*
const file_;
107 const std::string what_;
110 std::string verbose_what_;
210#define isc_throw(type, stream) \
212 std::ostringstream oss__; \
214 throw type(__FILE__, __LINE__, oss__.str().c_str()); \
220#define isc_throw_1(type, stream, param1) \
222 std::ostringstream oss__; \
224 throw type(__FILE__, __LINE__, oss__.str().c_str(), param1); \
230#define isc_throw_2(type, stream, param1, param2) \
232 std::ostringstream oss__; \
234 throw type(__FILE__, __LINE__, oss__.str().c_str(), param1, param2); \
240#define isc_throw_3(type, stream, param1, param2, param3) \
242 std::ostringstream oss__; \
244 throw type(__FILE__, __LINE__, oss__.str().c_str(), param1, param2,\
251#define isc_throw_4(type, stream, param1, param2, param3, param4) \
253 std::ostringstream oss__; \
255 throw type(__FILE__, __LINE__, oss__.str().c_str(), param1, param2,\
A generic exception that is thrown if a parameter given to a method is considered invalid in that con...
BadValue(const char *file, size_t line, const char *what)
This is a base class for exceptions thrown from the DNS library module.
Exception(const char *file, size_t line, const char *what)
Constructor for a given type for exceptions with file name and file line number.
const char * getFile() const
Gets the file name where the exception was thrown.
virtual ~Exception()
The destructor.
const std::string & getMessage() const
Gets a string describing the cause of the exception.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
size_t getLine() const
Gets the line number of the file where the exception was thrown.
A generic exception that is thrown if a function is called in a prohibited way.
InvalidOperation(const char *file, size_t line, const char *what)
A generic exception that is thrown if a parameter given to a method or function is considered invalid...
InvalidParameter(const char *file, size_t line, const char *what)
Exception thrown when a worker thread is trying to stop or pause the respective thread pool (which wo...
MultiThreadingInvalidOperation(const char *file, size_t line, const char *what)
A generic exception that is thrown when an object can not be found.
NotFound(const char *file, size_t line, const char *what)
A generic exception that is thrown when a function is not implemented.
NotImplemented(const char *file, size_t line, const char *what)
A generic exception that is thrown if a parameter given to a method would refer to or modify out-of-r...
OutOfRange(const char *file, size_t line, const char *what)
A generic exception that is thrown when an unexpected error condition occurs.
Unexpected(const char *file, size_t line, const char *what)
Defines the logger used by the top-level component of kea-lfc.