public void error(InvalidSpecCompileException e) {
    sourceUnit.getErrorCollector().addErrorAndContinue(new SyntaxErrorMessage(e, sourceUnit));
  }
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
spock-core/src/main/java/org/spockframework/compiler/ErrorReporter.java