java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.jooby.exception.StatusCodeException
io.jooby.exception.BadRequestException
io.jooby.exception.MissingValueException
- All Implemented Interfaces:
Serializable
Missing exception. Used when a required attribute/value is missing.
- Since:
- 2.0.0
- Author:
- edgar
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Parameter/attribute name.static <T> T
requireNonNull
(String name, T value) Check if the given value is null and throw aMissingValueException
exception.Methods inherited from class io.jooby.exception.StatusCodeException
getStatusCode
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MissingValueException
Creates a missing exception.- Parameters:
name
- Parameter/attribute name.
-
-
Method Details
-
getName
Parameter/attribute name.- Returns:
- Parameter/attribute name.
-
requireNonNull
Check if the given value is null and throw aMissingValueException
exception.- Type Parameters:
T
- Value type.- Parameters:
name
- Attribute's name.value
- Value to check.- Returns:
- Input value
-