Class ErrorHandler


  • public class ErrorHandler
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ErrorHandler()  
    • Constructor Detail

      • ErrorHandler

        public ErrorHandler()
    • Method Detail

      • handlePluginException

        public static void handlePluginException​(org.imixs.workflow.exceptions.PluginException pe)
        The Method expects a PluginException and adds the corresponding Faces Error Message into the FacesContext. If the PluginException was thrown from the RulePLugin then the method test this exception for ErrorParams and generate separate Faces Error Messages for each param.
      • addErrorMessage

        public static void addErrorMessage​(org.imixs.workflow.exceptions.WorkflowException pe)
        This helper method adds a error message to the faces context, based on the data in a WorkflowException. This kind of error message can be displayed in a page using: If a PluginException or ValidationException contains an optional object array the message is parsed for params to be replaced Example: ERROR_MESSAGE=Value should not be greater than {0} or lower as {1}.
        Parameters:
        pe -
      • handleModelException

        public static void handleModelException​(org.imixs.workflow.exceptions.ModelException me)
        The Method expects a ModelException and adds the corresponding Faces Error Message into the FacesContext. In case of a model exception, the exception message will become part of the error message. ErrorParams are not supported by a ModelException.