Class PathArgumentParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
io.github.grumpystuff.grumpyrest.request.PathArgumentParseException
- All Implemented Interfaces:
Response,SelfResponseFactory,Serializable
This exception type is thrown when a path argument cannot be parsed, wrapping a
FromStringParserException.
This indicates that the string to be parsed comes from a path segment (as opposed to a querystring parameter or
other string) and sends a standard response for a 404 error. This is needed because in general, parsing
a string from an arbitrary source might correspond to a 400 error or an internal (500) error, and might even
reveal sensitive information to the client, so no response factory will handle it by default.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPathArgumentParseException(String name, String value, FromStringParserException cause) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.grumpystuff.grumpyrest.response.SelfResponseFactory
transmit
-
Constructor Details
-
PathArgumentParseException
-
-
Method Details
-
getName
-
getValue
-
getCause
-
createResponse
Description copied from interface:SelfResponseFactoryCreates the response.- Specified by:
createResponsein interfaceSelfResponseFactory- Returns:
- the response
-