jml2b.exceptions
Class ErrorHandler

java.lang.Object
  extended byjml2b.util.Profiler
      extended byjml2b.exceptions.ErrorHandler
Direct Known Subclasses:
PoGeneratorErrorHandler, StderrHandler

public abstract class ErrorHandler
extends Profiler

Interface defining how errors are reported to the user.

Author:
A. Requet

Constructor Summary
ErrorHandler()
           
 
Method Summary
static void error(JmlFile f, int line, int column, java.lang.String description)
          Indicate an error in the specified file, line and column.
static int getErrorCount()
          Return the current error count.
static int getWarningCount()
          Return the current warning count.
static void reset()
          Reset the error and warnig counters.
static void setHandler(ErrorHandler h)
          Set the error handler that should be used.
static void warning(JmlFile f, int line, int column, java.lang.String description)
          Indicates an error in the specified file, line and column.
 
Methods inherited from class jml2b.util.Profiler
runGC
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorHandler

public ErrorHandler()
Method Detail

error

public static void error(JmlFile f,
                         int line,
                         int column,
                         java.lang.String description)
Indicate an error in the specified file, line and column. This method maintains the error count and delegates the real error handling to the currently installed handler (if any).


warning

public static void warning(JmlFile f,
                           int line,
                           int column,
                           java.lang.String description)
Indicates an error in the specified file, line and column. This method maintains the warning count and delegates the real error handling to the currently installed handler (if any).


reset

public static void reset()
Reset the error and warnig counters.


getErrorCount

public static int getErrorCount()
Return the current error count.


getWarningCount

public static int getWarningCount()
Return the current warning count.


setHandler

public static void setHandler(ErrorHandler h)
Set the error handler that should be used.