Package org.apache.tomcat.util.http
Class InvalidParameterException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalStateException
org.apache.tomcat.util.http.InvalidParameterException
- All Implemented Interfaces:
Serializable
Extend
IllegalStateException
to identify the cause as an invalid parameter.
Implementation note: This class extends IllegalStateException
since that is the class that the Servlet 6.1
onwards Javadocs define is thrown by the various ServletRequest.getParameterXXX()
methods.
- See Also:
-
Constructor Summary
ConstructorDescriptionInvalidParameterException
(String message) Construct a new exception with the given message.InvalidParameterException
(String message, int errorCode) Construct a new exception with the given message and error code.InvalidParameterException
(String message, Throwable cause) Construct a new exception with the given message and cause.Construct a new exception with the given cause.InvalidParameterException
(Throwable cause, int errorCode) Construct a new exception with the given cause and error code. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidParameterException
Construct a new exception with the given message.- Parameters:
message
- The message to use for the exception
-
InvalidParameterException
Construct a new exception with the given message and error code.- Parameters:
message
- The message to use for the exceptionerrorCode
- The HTTP status code to use when reporting this error. Expected to be >= 400.
-
InvalidParameterException
-
InvalidParameterException
Construct a new exception with the given cause. The message for this exception will be generated by callingcause.toString()
.- Parameters:
cause
- The exception to use as the cause of this exception
-
InvalidParameterException
Construct a new exception with the given cause and error code. The message for this exception will be generated by callingcause.toString()
.- Parameters:
cause
- The exception to use as the cause of this exceptionerrorCode
- The HTTP status code to use when reporting this error. Expected to be >= 400.
-
-
Method Details
-
getErrorCode
public int getErrorCode()
-