43 Exception(
const char* file,
size_t line,
const std::string& what);
59 virtual const char*
what()
const throw();
75 virtual const
char* what(
bool verbose) const throw();
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_;
117 OutOfRange(
const char* file,
size_t line,
const char* what) :
134 BadValue(
const char* file,
size_t line,
const char* what) :
155 Unexpected(
const char* file,
size_t line,
const char* what) :
177 NotFound(
const char* file,
size_t line,
const char* what) :
202 #define isc_throw(type, stream) \
204 std::ostringstream oss__; \
206 throw type(__FILE__, __LINE__, oss__.str().c_str()); \
212 #define isc_throw_1(type, stream, param1) \
214 std::ostringstream oss__; \
216 throw type(__FILE__, __LINE__, oss__.str().c_str(), param1); \
222 #define isc_throw_2(type, stream, param1, param2) \
224 std::ostringstream oss__; \
226 throw type(__FILE__, __LINE__, oss__.str().c_str(), param1, param2); \
232 #define isc_throw_3(type, stream, param1, param2, param3) \
234 std::ostringstream oss__; \
236 throw type(__FILE__, __LINE__, oss__.str().c_str(), param1, param2,\
243 #define isc_throw_4(type, stream, param1, param2, param3, param4) \
245 std::ostringstream oss__; \
247 throw type(__FILE__, __LINE__, oss__.str().c_str(), param1, param2,\
252 #endif // EXCEPTIONS_H
A generic exception that is thrown when a function is not implemented.
BadValue(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...
OutOfRange(const char *file, size_t line, const char *what)
NotFound(const char *file, size_t line, const char *what)
InvalidOperation(const char *file, size_t line, const char *what)
NotImplemented(const char *file, size_t line, const char *what)
const std::string & getMessage() const
Gets a string describing the cause of the exception.
virtual ~Exception()
The destructor.
A generic exception that is thrown if a parameter given to a method is considered invalid in that con...
A generic exception that is thrown when an unexpected error condition occurs.
Exception(const char *file, size_t line, const char *what)
Constructor for a given type for exceptions with file name and file line number.
size_t getLine() const
Gets the line number of the file where the exception was thrown.
const char * getFile() const
Gets the file name where the exception was thrown.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Unexpected(const char *file, size_t line, const char *what)
This is a base class for exceptions thrown from the DNS library module.
InvalidParameter(const char *file, size_t line, const char *what)
Defines the logger used by the top-level component of kea-dhcp-ddns.
A generic exception that is thrown if a function is called in a prohibited way.
A generic exception that is thrown if a parameter given to a method would refer to or modify out-of-r...
A generic exception that is thrown when an object can not be found.