|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.EventObject
freemarker.template.TemplateExceptionEvent
public final class TemplateExceptionEvent
Event object that is thrown at runtime whenever an exceptional situation occurs.
TemplateExceptionListener,
TemplateRuntimeHandler,
Serialized Form| Field Summary |
|---|
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
TemplateExceptionEvent(java.lang.Object source,
java.lang.Exception e,
java.io.Writer output,
java.lang.String sourceName,
TemplateRuntimeHandler.Severity severity)
Creates new TemplateExceptionEvent. |
|
| Method Summary | |
|---|---|
java.lang.Exception |
getException()
The exception that caused this event to be fired. |
java.io.PrintWriter |
getOutput()
Deprecated. use the getWriter() method for maximum efficiency,
since this method now has to wrap the underlying Writer
in a PrintWriter object |
TemplateRuntimeHandler.Severity |
getSeverity()
Retrieve the severity, such as TemplateRuntimeHandler.Severity.ERROR. |
java.lang.String |
getSourceName()
Get the name of the source, such as freemarker.template.Template.process |
java.io.Writer |
getWriter()
Get the Template's current Writer. |
| Methods inherited from class java.util.EventObject |
|---|
getSource, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TemplateExceptionEvent(java.lang.Object source,
java.lang.Exception e,
java.io.Writer output,
java.lang.String sourceName,
TemplateRuntimeHandler.Severity severity)
source - the source of the evente - the exception that caused the eventoutput - the output stream of the TemplatesourceName - the name of the event sourceseverity - the severity of the message| Method Detail |
|---|
public java.lang.String getSourceName()
freemarker.template.Template.process
public TemplateRuntimeHandler.Severity getSeverity()
TemplateRuntimeHandler.Severity.ERROR.
@Deprecated public java.io.PrintWriter getOutput()
getWriter() method for maximum efficiency,
since this method now has to wrap the underlying Writer
in a PrintWriter object
Template's current output stream. Used whenever we want
to send messages to the template's output as a result of this event.
Templatepublic java.io.Writer getWriter()
Template's current Writer. Used whenever
we want to send messages to the template's output as a result of
this event.
Writer for this Templatepublic java.lang.Exception getException()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||