Class ErrorNotifier

java.lang.Object
overit.geocall.da.DATask
overit.geocall.basic.ErrorNotifier
All Implemented Interfaces:
Serializable, Runnable, Identified, Tool

public class ErrorNotifier extends DATask
This class provides the methods signature that must be set if you have to manage the unhandled exceptions. Note that this task will be called only if the user has checked the "Send error" field into the error page.
See Also:
  • Field Details

  • Constructor Details

    • ErrorNotifier

      public ErrorNotifier()
  • Method Details

    • setError

      public void setError(Throwable t, String message)
      Set the unhandled exception that has been caught by the Servlet and the message the user has been written inside the error page's field. Note that the message is not mandatory
      Parameters:
      t - exception instance
      message - the user message
    • isEnabled

      public boolean isEnabled()
      Flag that enable or not the send error feature inside the error page. This method must be override inside the custom notifier.
      Returns:
      true to enable the send error feature, false otherwise
    • body

      protected void body() throws DAException, DAValidateException
      Description copied from class: DATask
      Abstract method, that must be implemented, that represent the start point of the task. The method contains the application logic of the specific task.
      Specified by:
      body in class DATask
      Throws:
      DAException - If there is a (blocking) data-access error, a DAException is thrown to the caller
      DAValidateException - If there are error in the data validation phase, a DAValidateException is thrown