org.anarres.cpp
Class DefaultErrorHandler

java.lang.Object
  extended by org.anarres.cpp.DefaultErrorHandler
All Implemented Interfaces:
ErrorHandler

public class DefaultErrorHandler
extends Object
implements ErrorHandler

An ErrorHandler which records all ErrorMessages.

See Also:
ErrorHandler, ErrorMessage

Field Summary
 
Fields inherited from interface org.anarres.cpp.ErrorHandler
ERR_ERROR, ERR_WARNING
 
Constructor Summary
DefaultErrorHandler()
           
 
Method Summary
 List<ErrorMessage> getErrorMessages()
          Returns the list of ErrorMessages recorded by this ErrorHandler.
 void handle(ErrorMessage msg)
          Handles an error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultErrorHandler

public DefaultErrorHandler()
Method Detail

getErrorMessages

public List<ErrorMessage> getErrorMessages()
Returns the list of ErrorMessages recorded by this ErrorHandler.


handle

public void handle(ErrorMessage msg)
            throws LexerException
Description copied from interface: ErrorHandler
Handles an error. The behaviour of this method is defined by the implementation. It may simply record the error message, or it may throw an exception.

Specified by:
handle in interface ErrorHandler
Throws:
LexerException


Copyright © 2007 Shevek, Anarres. All Rights Reserved.