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:
-
Constructor Summary
ConstructorsConstructorDescriptionParameterException
(String message) ParameterException
(String message, Throwable cause) Constructor that captures failure information so more useful feedback can be provided to the user. -
Method Summary
Modifier and TypeMethodDescriptionReturns acceptable values of this parameter.getName()
Returns the name of the parameter that caused the problem.getValue()
Returns the (invalid) value of the parameter that caused the problem.void
setAcceptableValues
(Set<String> acceptableValues) Sets acceptable values of this parameter.void
Sets the name of the parameter that caused the problem.void
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 Details
-
ParameterException
-
ParameterException
-
ParameterException
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 Details
-
setName
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
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
Sets acceptable values of this parameter.- Parameters:
acceptableValues
- acceptable values of this parameter- Since:
- 2.10
-
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
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
Returns acceptable values of this parameter.- Returns:
- acceptableValues acceptable values of this parameter
- Since:
- 2.10
-