Class EnforcerRuleException

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

public class EnforcerRuleException extends Exception
An exception occurring during the execution of a rule.

Enforcer plugin takes decision based on configuration and Enforcer Rule level whether build should pass or fail.

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

      @Deprecated public EnforcerRuleException(Object source, String shortMessage, String longMessage)
      Deprecated.
      source and longMessage are not used
      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
    • EnforcerRuleException

      public EnforcerRuleException(Throwable cause)
      Construct a new EnforcerRuleException exception wrapping an underlying Throwable.
      Parameters:
      cause - the cause
  • Method Details

    • getLongMessage

      @Deprecated public String getLongMessage()
      Deprecated.
      not used
      Gets the long message.
      Returns:
      the long message
    • getSource

      @Deprecated public Object getSource()
      Deprecated.
      not used
      Gets the source.
      Returns:
      the source