OpenMW
Public Member Functions | Protected Types | Private Member Functions | Private Attributes
Compiler::ErrorHandler Class Reference

Error handling. More...

#include <errorhandler.hpp>

List of all members.

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

Detailed Description

Error handling.

This class collects errors and provides an interface for reporting them to the user.


Member Enumeration Documentation

enum Compiler::ErrorHandler::Type [protected]
Enumerator:
WarningMessage 
ErrorMessage 

Constructor & Destructor Documentation

constructor

destructor


Member Function Documentation

Return number of errors.

Return number of warnings.

Generate an error message for an unexpected EOF.

void Compiler::ErrorHandler::error ( const std::string &  message,
const TokenLoc loc 
)

Generate an error message.

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.


Member Data Documentation


The documentation for this class was generated from the following files: