Class ParameterParseException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.IllegalArgumentException
-
- net.kautler.command.api.parameter.ParameterParseException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
InvalidParameterFormatException
,InvalidParameterValueException
public class ParameterParseException extends IllegalArgumentException
A parameter parse exception that is thrown if an exception happens during calling aParameterConverter
. The message should be written in a way so that it can be directly presented to the end user.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ParameterParseException(String message)
Constructs a new parameter parse exception with the given message.ParameterParseException(String parameterName, String parameterValue, String message)
Constructs a new parameter parse exception with the given message, parameter name and parameter value.ParameterParseException(String parameterName, String parameterValue, String message, Throwable cause)
Constructs a new parameter parse exception with the given message, cause, parameter name and parameter value.ParameterParseException(String message, Throwable cause)
Constructs a new parameter parse exception with the given message and cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getParameterName()
Returns the name of the parameter that was parsed.String
getParameterValue()
Returns the value of the parameter that was parsed.int
hashCode()
void
setParameterName(String parameterName)
Sets the name of the parameter that was parsed.void
setParameterValue(String parameterValue)
Sets the value of the parameter that was parsed.String
toString()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
ParameterParseException
public ParameterParseException(String message)
Constructs a new parameter parse exception with the given message. The message should be written in a way so that it can be directly presented to the end user.- Parameters:
message
- the detail message
-
ParameterParseException
public ParameterParseException(String message, Throwable cause)
Constructs a new parameter parse exception with the given message and cause. The message should be written in a way so that it can be directly presented to the end user.- Parameters:
message
- the detail messagecause
- the cause
-
ParameterParseException
public ParameterParseException(String parameterName, String parameterValue, String message)
Constructs a new parameter parse exception with the given message, parameter name and parameter value. The message should be written in a way so that it can be directly presented to the end user.- Parameters:
message
- the detail messageparameterName
- the name of the parameter that was parsedparameterValue
- the value of the parameter that was parsed
-
ParameterParseException
public ParameterParseException(String parameterName, String parameterValue, String message, Throwable cause)
Constructs a new parameter parse exception with the given message, cause, parameter name and parameter value. The message should be written in a way so that it can be directly presented to the end user.- Parameters:
message
- the detail messagecause
- the causeparameterName
- the name of the parameter that was parsedparameterValue
- the value of the parameter that was parsed
-
-
Method Detail
-
getParameterName
public String getParameterName()
Returns the name of the parameter that was parsed.- Returns:
- the name of the parameter that was parsed
-
setParameterName
public void setParameterName(String parameterName)
Sets the name of the parameter that was parsed.- Parameters:
parameterName
- the name of the parameter that was parsed
-
getParameterValue
public String getParameterValue()
Returns the value of the parameter that was parsed.- Returns:
- the value of the parameter that was parsed
-
setParameterValue
public void setParameterValue(String parameterValue)
Sets the value of the parameter that was parsed.- Parameters:
parameterValue
- the value of the parameter that was parsed
-
-