Deepsolver
|
The exception class for md5file syntax errors. More...
Public Types | |
enum | { TooShortLine = 0, InvalidChecksumFormat = 2 } |
Public Member Functions | |
int | getCode () const |
Returns the type of encountered error. | |
const std::string & | getFileName () const |
Returns the name of a file with invalid line. | |
const std::string & | getLine () const |
Returns the text of the invalid line. | |
size_t | getLineNumber () const |
Returns number of an invalid line in file. | |
std::string | getMessage () const |
Returns the single line error description. | |
std::string | getType () const |
Returns the string with error type. | |
Md5FileException (int code, const std::string &fileName, size_t lineNumber, const std::string &line) | |
The constructor. | |
virtual | ~Md5FileException () |
The destructor. |
This class instance is thrown when md5file syntax error isCon encountered. The client application can access various information with it about the problem like file name, line number, line content and error code.
Md5FileException::Md5FileException | ( | int | code, |
const std::string & | fileName, | ||
size_t | lineNumber, | ||
const std::string & | line | ||
) | [inline] |
[in] | code | The error code describing the type of error |
[in] | fileName | Name of a file being processed |
[in] | lineNumber | The number of a line with encountered error |
[in] | line | The text of an invalid line |
int Md5FileException::getCode | ( | ) | const [inline] |
Use this method to get type of an error.
const std::string& Md5FileException::getFileName | ( | ) | const [inline] |
Use this method to get name of a file with an invalid line.
const std::string& Md5FileException::getLine | ( | ) | const [inline] |
Use this method to get text of the invalid line.
size_t Md5FileException::getLineNumber | ( | ) | const [inline] |
Use this method to get number of line with the syntax problem.
std::string Md5FileException::getMessage | ( | ) | const [inline, virtual] |
This method returns the single line string value with error description. Usually it is the value printed to user in error message. The value may not include error type since it can be obtained with getType() method.
Implements DeepsolverException.
std::string Md5FileException::getType | ( | ) | const [inline, virtual] |
This method returns the short string with one or two words describing the error type. For example, this method can return values like "system", "rpm" etc. The value returned by this method usually is used for error message construction.
Implements DeepsolverException.