public class ErrorReporter
extends java.lang.Object
write()
.Constructor and Description |
---|
ErrorReporter(java.lang.Throwable e)
Configures a new Reporter.
|
ErrorReporter(java.lang.Throwable e,
boolean debug)
Configures a new Reporter.
|
Modifier and Type | Method and Description |
---|---|
protected void |
dispatch(java.lang.Throwable object,
boolean child)
Runs the report once all initialization is complete.
|
protected void |
println(java.lang.String line)
Prints a line to the underlying
PrintStream |
protected void |
println(java.lang.StringBuffer line) |
protected void |
report(CompilationFailedException e,
boolean child)
For CompilationFailedException.
|
protected void |
report(java.lang.Exception e,
boolean child)
For Exception.
|
protected void |
report(GroovyExceptionInterface e,
boolean child)
For GroovyException.
|
protected void |
report(java.lang.Throwable e,
boolean child)
For everything else.
|
protected void |
stacktrace(java.lang.Throwable e,
boolean always)
Displays an exception's stack trace, if
debug or
always . |
void |
write(java.io.PrintStream stream)
Writes the error to the specified
PrintStream . |
void |
write(java.io.PrintWriter writer)
Writes the error to the specified
PrintWriter . |
public ErrorReporter(java.lang.Throwable e)
e
- the exception on which to reportpublic ErrorReporter(java.lang.Throwable e, boolean debug)
e
- the exception on which to reportdebug
- if set, stack traces will be output for all reportspublic void write(java.io.PrintStream stream)
PrintStream
.public void write(java.io.PrintWriter writer)
PrintWriter
.protected void dispatch(java.lang.Throwable object, boolean child)
protected void report(CompilationFailedException e, boolean child)
protected void report(GroovyExceptionInterface e, boolean child)
protected void report(java.lang.Exception e, boolean child)
protected void report(java.lang.Throwable e, boolean child)
protected void println(java.lang.String line)
PrintStream
protected void println(java.lang.StringBuffer line)
protected void stacktrace(java.lang.Throwable e, boolean always)
debug
or
always
.