freemarker.template
Interface TemplateRuntimeHandler

All Known Implementing Classes:
SimpleEventAdapter, TemplateEventAdapter

public interface TemplateRuntimeHandler

Interface for handling events that occur during FM-Classic template runtime. This can be implemented by adapter classes, or can be handled directly.

Since:
1.8
Version:
$Id: TemplateRuntimeHandler.java 1101 2013-04-01 04:17:32Z run2000 $
See Also:
TemplateExceptionEvent, TemplateExceptionListener

Nested Class Summary
static class TemplateRuntimeHandler.Severity
          Enumerates the severity of a runtime template error.
 
Method Summary
 void fireExceptionThrown(java.lang.Object source, java.lang.Exception exception, java.io.Writer output, java.lang.String sourceName, TemplateRuntimeHandler.Severity severity)
          Fires a TemplateExceptionEvent to indicate that an exception has occurred in the FM-Classic runtime.
 

Method Detail

fireExceptionThrown

void fireExceptionThrown(java.lang.Object source,
                         java.lang.Exception exception,
                         java.io.Writer output,
                         java.lang.String sourceName,
                         TemplateRuntimeHandler.Severity severity)
Fires a TemplateExceptionEvent to indicate that an exception has occurred in the FM-Classic runtime. Implementations can use this method to pass the event to TemplateExceptionListener objects.

Parameters:
source - the source object of the event
exception - the exception that caused the event to be fired
output - the current Template output stream
sourceName - the name of the source class and method that fired the event
severity - the severity of the exception