dlvhex
2.5.0
|
Error caused by malformed input program. More...
#include <include/dlvhex2/Error.h>
Public Member Functions | |
SyntaxError (const std::string &msg, const unsigned line=0, const std::string &file="") | |
Constructor. | |
virtual | ~SyntaxError () throw () |
Destructor. | |
virtual std::string | getErrorMsg () const |
Returns a formatted error message, indicating the origin of the syntax error, if available. | |
void | setLine (unsigned line) |
Specifies the line that should be included in the error message. | |
void | setFile (const std::string &file) |
Specifies the filename that should be specified in the error message. | |
Private Attributes | |
unsigned | line |
Line number of the error. | |
std::string | file |
File where the error occurred. |
SyntaxError::SyntaxError | ( | const std::string & | msg, |
const unsigned | line = 0 , |
||
const std::string & | file = "" |
||
) | [explicit] |
virtual SyntaxError::~SyntaxError | ( | ) | throw () [inline, virtual] |
std::string SyntaxError::getErrorMsg | ( | ) | const [virtual] |
Returns a formatted error message, indicating the origin of the syntax error, if available.
Reimplemented from GeneralError.
void SyntaxError::setFile | ( | const std::string & | file | ) |
void SyntaxError::setLine | ( | unsigned | line | ) |
std::string SyntaxError::file [private] |
File where the error occurred.
Definition at line 132 of file Error.h.
Referenced by getErrorMsg(), and setFile().
unsigned SyntaxError::line [private] |
Line number of the error.
Definition at line 130 of file Error.h.
Referenced by getErrorMsg(), and setLine().