Interface ErrorFormatter

All Known Implementing Classes:
DefaultErrorFormatter

public interface ErrorFormatter
Defines how to format the exceptions. The default implementation is the DefaultErrorFormatter. Note, that there is ONE ErrorFormatter instance used by the dispatcher. Calls to format are not synchronized, your implementation must be thread-safe!
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the page which is sent to the browser, containing the error message.
    Return a json implementation of the error, called in ajax requests.
  • Method Details

    • format

      Page format(Throwable e)
      Returns the page which is sent to the browser, containing the error message.
      Parameters:
      e -
      Returns:
      the page, for example an HTMLPage object.
    • formatJSON

      JSONObject formatJSON(Throwable e)
      Return a json implementation of the error, called in ajax requests. See the default implementation in DefaultErrorFormatter.formatJSON(Throwable) for details about the returned structure.
      Parameters:
      e -
      Returns:
      a json object