The info file syntax error.
More...
List of all members.
Public Types |
enum | { UnexpectedCharacter,
IncompleteLine,
CodeCount
} |
Public Member Functions |
void | accept (ExceptionVisitor &visitor) const |
| Calls appropriate visitor method.
|
int | getCode () const |
| Returns the error code.
|
std::string | getLine () const |
| Returns the wrong line content.
|
size_t | getLineNumber () const |
| Returns the number of the invalid line.
|
std::string | getMessage () const |
| Returns a single line error description.
|
std::string | getType () const |
| Returns a string with short error type designation.
|
| InfoFileSyntaxException (int code, size_t lineNumber, const std::string &line) |
| The constructor.
|
virtual | ~InfoFileSyntaxException () |
| The destructor.
|
Detailed Description
This exception signales about an invalid syntax of a repository info file. Info files usually come as basic header of remote package repositories.
- See also:
- InfoFileValueException
Constructor & Destructor Documentation
Deepsolver::InfoFileSyntaxException::InfoFileSyntaxException |
( |
int |
code, |
|
|
size_t |
lineNumber, |
|
|
const std::string & |
line |
|
) |
| [inline] |
- Parameters:
-
[in] | code | The error code |
[in] | lineNumber | The number of the invalid line |
[in] | line | The invalid line content |
Member Function Documentation
void Deepsolver::InfoFileSyntaxException::accept |
( |
ExceptionVisitor & |
visitor | ) |
const [inline, virtual] |
This method performs invocation of corresponding visit() method of the visitor, provided by the reference. You should use it each time, when you want to make particular handling action for various exception types, as it suggested by design pattern "visitor".
- Parameters:
-
[in] | visitor | The reference to the visitor |
Implements Deepsolver::AbstractException.
int Deepsolver::InfoFileSyntaxException::getCode |
( |
| ) |
const [inline] |
std::string Deepsolver::InfoFileSyntaxException::getLine |
( |
| ) |
const [inline] |
- Returns:
- The wrong line content
size_t Deepsolver::InfoFileSyntaxException::getLineNumber |
( |
| ) |
const [inline] |
- Returns:
- The number of the invalid line
std::string Deepsolver::InfoFileSyntaxException::getMessage |
( |
| ) |
const [virtual] |
This method returns a single line string value with error description. Usually it is the value printed to user in the error message. The value should not include error type, since it can be obtained through getType() method.
- Returns:
- A single line error description
Implements Deepsolver::AbstractException.
std::string Deepsolver::InfoFileSyntaxException::getType |
( |
| ) |
const [inline, virtual] |
This method returns a short string with one or two words describing the error type. For example, this method can return values like "system", "back-end" etc. A value returned by this method usually is used for error message construction.
- Returns:
- A short string with error type designation
Implements Deepsolver::AbstractException.