Class ParameterException

  • All Implemented Interfaces:
    Serializable

    public class ParameterException
    extends com.atlassian.renderer.v2.macro.MacroException
    Thrown when there is a problem while processing a parameter.
    Since:
    2.9
    See Also:
    Serialized Form
    • Constructor Detail

      • ParameterException

        public ParameterException​(String message)
      • ParameterException

        public ParameterException​(String message,
                                  Throwable cause)
      • ParameterException

        public ParameterException​(Throwable cause,
                                  String name,
                                  String value,
                                  Set<String> acceptableValues)
        Constructor that captures failure information so more useful feedback can be provided to the user.
        Parameters:
        cause - the underlying cause, if any
        name - the name of the parameter with the error
        value - the (invalid) value that caused the problem
        acceptableValues - acceptable values for the parameter
        Since:
        2.10
    • Method Detail

      • setName

        public void setName​(String name)
        Sets the name of the parameter that caused the problem.
        Parameters:
        name - the name of the parameter that caused the problem
        Since:
        2.10
      • setValue

        public void setValue​(String value)
        Sets the (invalid) value of the parameter that caused the problem.
        Parameters:
        value - the (invalid) value of the parameter that caused the problem
        Since:
        2.10
      • setAcceptableValues

        public void setAcceptableValues​(Set<String> acceptableValues)
        Sets acceptable values of this parameter.
        Parameters:
        acceptableValues - acceptable values of this parameter
        Since:
        2.10
      • getName

        public String getName()
        Returns the name of the parameter that caused the problem.
        Returns:
        the name of the parameter that caused the problem
        Since:
        2.10
      • getValue

        public String getValue()
        Returns the (invalid) value of the parameter that caused the problem.
        Returns:
        value the (invalid) value of the parameter that caused the problem
        Since:
        2.10
      • getAcceptableValues

        public Set<String> getAcceptableValues()
        Returns acceptable values of this parameter.
        Returns:
        acceptableValues acceptable values of this parameter
        Since:
        2.10