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();
82 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_;
192 #define isc_throw(type, stream) \ 194 std::ostringstream oss__; \ 196 throw type(__FILE__, __LINE__, oss__.str().c_str()); \ 202 #define isc_throw_1(type, stream, param1) \ 204 std::ostringstream oss__; \ 206 throw type(__FILE__, __LINE__, oss__.str().c_str(), param1); \ 212 #define isc_throw_2(type, stream, param1, param2) \ 214 std::ostringstream oss__; \ 216 throw type(__FILE__, __LINE__, oss__.str().c_str(), param1, param2); \ 222 #define isc_throw_3(type, stream, param1, param2, param3) \ 224 std::ostringstream oss__; \ 226 throw type(__FILE__, __LINE__, oss__.str().c_str(), param1, param2,\ 233 #define isc_throw_4(type, stream, param1, param2, param3, param4) \ 235 std::ostringstream oss__; \ 237 throw type(__FILE__, __LINE__, oss__.str().c_str(), param1, param2,\ 242 #endif // EXCEPTIONS_H A generic exception that is thrown when a function is not implemented.
const std::string & getMessage() const
Gets a string describing the cause of the exception.
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)
InvalidOperation(const char *file, size_t line, const char *what)
NotImplemented(const char *file, size_t line, const char *what)
virtual ~Exception()
The destructor.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
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.
const char * getFile() const
Gets the file name where the exception was thrown.
Exception(const char *file, size_t line, const char *what)
Constructor for a given type for exceptions with file name and file line number.
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...
size_t getLine() const
Gets the line number of the file where the exception was thrown.