|
OpenMW
|
Error handling. More...
#include <errorhandler.hpp>
Public Member Functions | |
| ErrorHandler () | |
| constructor | |
| virtual | ~ErrorHandler () |
| destructor | |
| bool | isGood () const |
| Was compiling successful? | |
| int | countErrors () const |
| Return number of errors. | |
| int | countWarnings () const |
| Return number of warnings. | |
| void | warning (const std::string &message, const TokenLoc &loc) |
| Generate a warning message. | |
| void | error (const std::string &message, const TokenLoc &loc) |
| Generate an error message. | |
| void | endOfFile () |
| Generate an error message for an unexpected EOF. | |
| virtual void | reset () |
| Remove all previous error/warning events. | |
Protected Types | |
| enum | Type { WarningMessage, ErrorMessage } |
Private Member Functions | |
| virtual void | report (const std::string &message, const TokenLoc &loc, Type type)=0 |
| Report error to the user. | |
| virtual void | report (const std::string &message, Type type)=0 |
| Report a file related error. | |
Private Attributes | |
| int | mWarnings |
| int | mErrors |
Error handling.
This class collects errors and provides an interface for reporting them to the user.
enum Compiler::ErrorHandler::Type [protected] |
constructor
| Compiler::ErrorHandler::~ErrorHandler | ( | ) | [virtual] |
destructor
| int Compiler::ErrorHandler::countErrors | ( | ) | const |
Return number of errors.
| int Compiler::ErrorHandler::countWarnings | ( | ) | const |
Return number of warnings.
| void Compiler::ErrorHandler::endOfFile | ( | ) |
Generate an error message for an unexpected EOF.
| void Compiler::ErrorHandler::error | ( | const std::string & | message, |
| const TokenLoc & | loc | ||
| ) |
Generate an error message.
| bool Compiler::ErrorHandler::isGood | ( | ) | const |
Was compiling successful?
| virtual void Compiler::ErrorHandler::report | ( | const std::string & | message, |
| const TokenLoc & | loc, | ||
| Type | type | ||
| ) | [private, pure virtual] |
Report error to the user.
Implemented in MWGui::Console, Compiler::StreamErrorHandler, and Compiler::NullErrorHandler.
| virtual void Compiler::ErrorHandler::report | ( | const std::string & | message, |
| Type | type | ||
| ) | [private, pure virtual] |
Report a file related error.
Implemented in MWGui::Console, Compiler::StreamErrorHandler, and Compiler::NullErrorHandler.
| void Compiler::ErrorHandler::reset | ( | ) | [virtual] |
Remove all previous error/warning events.
| void Compiler::ErrorHandler::warning | ( | const std::string & | message, |
| const TokenLoc & | loc | ||
| ) |
Generate a warning message.
int Compiler::ErrorHandler::mErrors [private] |
int Compiler::ErrorHandler::mWarnings [private] |
1.7.6.1