|
|||||
FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Provides services for reporting compilation errors to the
user. Primary entry point is write()
.
Field Summary | |
---|---|
Throwable |
base
|
boolean |
debug
|
Object |
output
|
Constructor Summary | |
ErrorReporter(Throwable e)
Configures a new Reporter. |
|
ErrorReporter(Throwable e, boolean debug)
Configures a new Reporter. |
Method Summary | |
---|---|
void |
dispatch(Throwable object, boolean child)
Runs the report once all initialization is complete. |
void |
println(String line)
Prints a line to the underlying PrintStream
|
void |
println(StringBuffer line)
|
void |
report(CompilationFailedException e, boolean child)
For CompilationFailedException. |
void |
report(GroovyExceptionInterface e, boolean child)
For GroovyException. |
void |
report(Exception e, boolean child)
For Exception. |
void |
report(Throwable e, boolean child)
For everything else. |
void |
stacktrace(Throwable e, boolean always)
Displays an exception's stack trace, if debug or
always .
|
void |
write(PrintStream stream)
Writes the error to the specified PrintStream .
|
void |
write(PrintWriter writer)
Writes the error to the specified PrintWriter .
|
Constructor Detail |
---|
public ErrorReporter(Throwable e)
public ErrorReporter(Throwable e, boolean debug)
Method Detail |
---|
void dispatch(Throwable object, boolean child)
void println(String line)
PrintStream
void println(StringBuffer line)
void report(CompilationFailedException e, boolean child)
void report(GroovyExceptionInterface e, boolean child)
void report(Exception e, boolean child)
void report(Throwable e, boolean child)
void stacktrace(Throwable e, boolean always)
debug
or
always
.
public void write(PrintStream stream)
PrintStream
.
public void write(PrintWriter writer)
PrintWriter
.