Package com.groiss.gui
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 TypeMethodDescriptionReturns 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
Returns the page which is sent to the browser, containing the error message.- Parameters:
e
-- Returns:
- the page, for example an HTMLPage object.
-
formatJSON
Return a json implementation of the error, called in ajax requests. See the default implementation inDefaultErrorFormatter.formatJSON(Throwable)
for details about the returned structure.- Parameters:
e
-- Returns:
- a json object
-