freemarker.template
Interface TemplateRuntimeHandler

All Known Implementing Classes:
TemplateEventAdapter, SimpleEventAdapter

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,v 1.1 2003/11/23 00:12:41 run2000 Exp $
See Also:
TemplateExceptionEvent, TemplateExceptionListener

Field Summary
static int SEVERITY_DEPRECATION
          Used whenever a deprecated construct is encountered.
static int SEVERITY_ERROR
          A severe error has occurred, that may prevent FM-Classic from processing the template.
static int SEVERITY_WARNING
          An error that is non-critical to the continuation of processing.
 
Method Summary
 void fireExceptionThrown(java.lang.Object source, java.lang.Exception exception, java.io.Writer output, java.lang.String sourceName, int severity)
          Fires a TemplateExceptionEvent to indicate that an exception has occurred in the FM-Classic runtime.
 

Field Detail

SEVERITY_ERROR

public static final int SEVERITY_ERROR
A severe error has occurred, that may prevent FM-Classic from processing the template.

SEVERITY_WARNING

public static final int SEVERITY_WARNING
An error that is non-critical to the continuation of processing.

SEVERITY_DEPRECATION

public static final int SEVERITY_DEPRECATION
Used whenever a deprecated construct is encountered.
Method Detail

fireExceptionThrown

public void fireExceptionThrown(java.lang.Object source,
                                java.lang.Exception exception,
                                java.io.Writer output,
                                java.lang.String sourceName,
                                int 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