Package io.avaje.http.api
Class RequiredArgumentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
io.avaje.http.api.RequiredArgumentException
- All Implemented Interfaces:
Serializable
public class RequiredArgumentException extends IllegalArgumentException
Exception for parameters that are required.
This is primarily intended for use when populating Kotlin form beans with non-nullable properties and failing early rather than validate the entire bean.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description RequiredArgumentException(Exception e)
Construct with an exception.RequiredArgumentException(String message, Exception e)
Construct with a message and exception.RequiredArgumentException(String message, String property)
Construct with a message and property. -
Method Summary
Modifier and Type Method Description String
getProperty()
Return the name of the property that is required.void
setProperty(String property)
Set the name of the required property.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RequiredArgumentException
Construct with a message and property. -
RequiredArgumentException
Construct with an exception. -
RequiredArgumentException
Construct with a message and exception.
-
-
Method Details
-
getProperty
Return the name of the property that is required. -
setProperty
Set the name of the required property.
-