Kea 2.7.6
isc::log::MessageException Class Reference

Message Exception. More...

#include <message_exception.h>

+ Inheritance diagram for isc::log::MessageException:

Public Member Functions

 MessageException (const char *file, size_t line, const char *what, MessageID id, const std::string &arg1, const std::string &arg2, int lineno)
 Constructor.
 
 MessageException (const char *file, size_t line, const char *what, MessageID id, const std::string &arg1, int lineno)
 Constructor.
 
 MessageException (const char *file, size_t line, const char *what, MessageID id, int lineno)
 Constructor.
 
 ~MessageException ()
 Destructor.
 
std::vector< std::string > arguments () const
 Return Arguments.
 
MessageID id () const
 Return Message ID.
 
- Public Member Functions inherited from isc::Exception
virtual const char * what () const throw ()
 Returns a C-style character string of the cause of the exception.
 
virtual const char * what (bool verbose) const throw ()
 Returns a C-style character string of the cause of exception.
 
const std::string & getMessage () const
 Gets a string describing the cause of the exception.
 
const char * getFile () const
 Gets the file name where the exception was thrown.
 
size_t getLine () const
 Gets the line number of the file 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.
 
 Exception (const char *file, size_t line, const std::string &what)
 Constructor for a given type for exceptions with file name and file line number.
 
virtual ~Exception () throw ()
 The destructor.
 

Detailed Description

Message Exception.

Used in the message reader, this simple exception class allows a message code and its arguments to be encapsulated in an exception and thrown up the stack.

Definition at line 28 of file message_exception.h.

Constructor & Destructor Documentation

◆ MessageException() [1/3]

isc::log::MessageException::MessageException ( const char * file,
size_t line,
const char * what,
MessageID id,
int lineno )
inline

Constructor.

Parameters
fileFilename where the exception occurred.
lineLine where exception occurred.
whatText description of the problem.
idMessage identification.
linenoLine number on which error occurred (if > 0).

Definition at line 38 of file message_exception.h.

◆ MessageException() [2/3]

isc::log::MessageException::MessageException ( const char * file,
size_t line,
const char * what,
MessageID id,
const std::string & arg1,
int lineno )
inline

Constructor.

Parameters
fileFilename where the exception occurred.
lineLine where exception occurred.
whatText description of the problem.
idMessage identification.
arg1First message argument.
linenoLine number on which error occurred (if > 0).

Definition at line 55 of file message_exception.h.

◆ MessageException() [3/3]

isc::log::MessageException::MessageException ( const char * file,
size_t line,
const char * what,
MessageID id,
const std::string & arg1,
const std::string & arg2,
int lineno )
inline

Constructor.

Parameters
fileFilename where the exception occurred.
lineLine where exception occurred.
whatText description of the problem.
idMessage identification.
arg1First message argument.
arg2Second message argument.
linenoLine number on which error occurred (if > 0).

Definition at line 74 of file message_exception.h.

◆ ~MessageException()

isc::log::MessageException::~MessageException ( )
inline

Destructor.

Definition at line 87 of file message_exception.h.

Member Function Documentation

◆ arguments()

std::vector< std::string > isc::log::MessageException::arguments ( ) const
inline

Return Arguments.

Returns
Exception Arguments

Definition at line 99 of file message_exception.h.

Referenced by main(), and isc::log::LoggerManager::readLocalMessageFile().

◆ id()

MessageID isc::log::MessageException::id ( ) const
inline

Return Message ID.

Returns
Message identification

Definition at line 92 of file message_exception.h.

Referenced by main(), and isc::log::LoggerManager::readLocalMessageFile().


The documentation for this class was generated from the following file: