Public Types | |
enum | { INVALID_SECTION_HEADER = 1, EMPTY_SECTION_NAME = 2, PARAMETER_WITHOUT_SECTION = 3, INVALID_UNQUOTED_VALUE = 4, INVALID_LINE_BEGINNING = 5, INVALID_PARAMETER_NAME = 6, INVALID_CHAR_AFTER_EQUALS = 7, UNEXPECTED_LINE_END = 8 } |
Codes of various errors during configuration file reading process. More... | |
Public Member Functions | |
ConfigFileException (int code, const std::string &fileName, size_t line) | |
The constructor with error code, file name and line number specification. | |
ConfigFileException (int code) | |
The constructor only with error code specification. | |
int | getCode () const |
Returns error code. | |
std::string | getDescr () const |
Returns the string with error description. | |
std::string | getFileName () const |
Returns name of a file with error. | |
size_t | getLine () const |
Returns line number. | |
std::string | getMessage () const |
Prepares complete error description with file name and line number if there are any. | |
void | makeLogReport (int level) const |
Sends error description to logging system. | |
virtual | ~ConfigFileException () |
anonymous enum |
ConfigFileException::ConfigFileException | ( | int | code | ) | [inline] |
[in] | code | The error code for new exception object |
ConfigFileException::ConfigFileException | ( | int | code, | |
const std::string & | fileName, | |||
size_t | line | |||
) | [inline] |
[in] | code | The error code for new exception object |
[in] | fileName | Name of a file with error |
[in] | line | The line number with error (must not be zero) |
virtual ConfigFileException::~ConfigFileException | ( | ) | [inline, virtual] |
The destructor
size_t ConfigFileException::getLine | ( | ) | const [inline] |
This method has assert() to check current object was created through the constructor with line number specification.