Class EnforcerRuleException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.maven.enforcer.rule.api.EnforcerRuleException
All Implemented Interfaces:
Serializable

public class EnforcerRuleException extends Exception
An exception occurring during the execution of a rule. Based off of EnforcerRuleException, but separated to keep the rule dependencies to a minimum.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      serialVersionUID.
      See Also:
    • source

      protected Object source
      The source.
    • longMessage

      protected String longMessage
      The long message.
  • Constructor Details

    • EnforcerRuleException

      public EnforcerRuleException(Object source, String shortMessage, String longMessage)
      Construct a new EnforcerRuleException exception providing the source and a short and long message.
      Parameters:
      source - the source
      shortMessage - the short message
      longMessage - the long message
    • EnforcerRuleException

      public EnforcerRuleException(String message, Exception cause)
      Construct a new EnforcerRuleException exception wrapping an underlying Exception and providing a message.
      Parameters:
      message - the message
      cause - the cause
    • EnforcerRuleException

      public EnforcerRuleException(String message, Throwable cause)
      Construct a new EnforcerRuleException exception wrapping an underlying Throwable and providing a message.
      Parameters:
      message - the message
      cause - the cause
    • EnforcerRuleException

      public EnforcerRuleException(String message)
      Construct a new EnforcerRuleException exception providing a message.
      Parameters:
      message - the message
  • Method Details

    • getLongMessage

      public String getLongMessage()
      Gets the long message.
      Returns:
      the long message
    • getSource

      public Object getSource()
      Gets the source.
      Returns:
      the source