org.spockframework.compiler
Class ErrorReporter

java.lang.Object
  extended by org.spockframework.compiler.ErrorReporter

public class ErrorReporter
extends Object

Reporting facility for problems found during compilation. In general, error(ASTNode) is the preferred method to use. error(InvalidSpecCompileException) should only be used if compilation cannot continue in the same method where the error was found (because some steps need to be skipped). In that case, a InvalidSpecCompileException should be thrown at the point where the error is detected, and an outer method should catch the exception and pass it on to ErrorReporter.

Author:
Peter Niederwieser

Constructor Summary
ErrorReporter(SourceUnit sourceUnit)
           
 
Method Summary
 void error(ASTNode node, String msg, Object... args)
           
 void error(int line, int column, String msg, Object... args)
           
 void error(InvalidSpecCompileException e)
           
 void error(String msg, Object... args)
           
 void error(String msg, Throwable cause, Object... args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorReporter

public ErrorReporter(SourceUnit sourceUnit)
Method Detail

error

public void error(String msg,
                  Object... args)

error

public void error(String msg,
                  Throwable cause,
                  Object... args)

error

public void error(ASTNode node,
                  String msg,
                  Object... args)

error

public void error(int line,
                  int column,
                  String msg,
                  Object... args)

error

public void error(InvalidSpecCompileException e)


Copyright © 2010. All Rights Reserved.