Class ParameterException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.atlassian.renderer.v2.macro.MacroException
-
- com.atlassian.confluence.macro.params.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 Summary
Constructors Constructor Description ParameterException(String message)
ParameterException(String message, Throwable cause)
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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getAcceptableValues()
Returns acceptable values of this parameter.String
getName()
Returns the name of the parameter that caused the problem.String
getValue()
Returns the (invalid) value of the parameter that caused the problem.void
setAcceptableValues(Set<String> acceptableValues)
Sets acceptable values of this parameter.void
setName(String name)
Sets the name of the parameter that caused the problem.void
setValue(String value)
Sets the (invalid) value of the parameter that caused the problem.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ParameterException
public ParameterException(String message)
-
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 anyname
- the name of the parameter with the errorvalue
- the (invalid) value that caused the problemacceptableValues
- 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
-
-