Package org.codehaus.groovy.tools
Class ErrorReporter
java.lang.Object
org.codehaus.groovy.tools.ErrorReporter
Provides services for reporting compilation errors to the
 user.  Primary entry point is 
write().- 
Constructor SummaryConstructorsConstructorDescriptionConfigures a new Reporter.ErrorReporter(Throwable e, boolean debug) Configures a new Reporter.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidRuns the report once all initialization is complete.protected voidPrints a line to the underlyingPrintStreamprotected voidprintln(StringBuffer line) protected voidFor Exception.protected voidFor everything else.protected voidreport(CompilationFailedException e, boolean child) For CompilationFailedException.protected voidreport(GroovyExceptionInterface e, boolean child) For GroovyException.protected voidstacktrace(Throwable e, boolean always) Displays an exception's stack trace, ifdebugoralways.voidwrite(PrintStream stream) Writes the error to the specifiedPrintStream.voidwrite(PrintWriter writer) Writes the error to the specifiedPrintWriter.
- 
Constructor Details- 
ErrorReporterConfigures a new Reporter. Default mode is not to report a stack trace unless the error was not of one of the supported types.- Parameters:
- e- the exception on which to report
 
- 
ErrorReporterConfigures a new Reporter.- Parameters:
- e- the exception on which to report
- debug- if set, stack traces will be output for all reports
 
 
- 
- 
Method Details- 
writeWrites the error to the specifiedPrintStream.
- 
writeWrites the error to the specifiedPrintWriter.
- 
dispatchRuns the report once all initialization is complete.
- 
reportFor CompilationFailedException.
- 
reportFor GroovyException.
- 
reportFor Exception.
- 
reportFor everything else.
- 
printlnPrints a line to the underlyingPrintStream
- 
println
- 
stacktraceDisplays an exception's stack trace, ifdebugoralways.
 
-