AttemptExceptionReporter (FreeMarker 2.3.35 API)
Description: declaration: package: freemarker.template, interface: AttemptExceptionReporter

Package freemarker.template

# Interface AttemptExceptionReporter

public interface AttemptExceptionReporter
Used for the `attempt_exception_reported` configuration setting.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static AttemptExceptionReporter`
  `LOG_ERROR_REPORTER`
  Logs the exception into the "freemarker.runtime" log category with "error" log level.
  `static AttemptExceptionReporter`
  `LOG_WARN_REPORTER`
  Like `LOG_ERROR_REPORTER`, but it logs with "warn" log level.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `report​(TemplateException te, Environment env)`
  Called to log or otherwise report the error that has occurred inside an `#attempt` block.

- ## Field Details

  - ### LOG_ERROR_REPORTER

    static final AttemptExceptionReporter LOG_ERROR_REPORTER
    Logs the exception into the "freemarker.runtime" log category with "error" log level. This is the default `AttemptExceptionReporter`. The error message will explain that the error was handled by an `#attempt` block.

  - ### LOG_WARN_REPORTER

    static final AttemptExceptionReporter LOG_WARN_REPORTER
    Like `LOG_ERROR_REPORTER`, but it logs with "warn" log level.

- ## Method Details

  - ### report

    void report​(TemplateException te, Environment env)
    Called to log or otherwise report the error that has occurred inside an `#attempt` block.