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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetProperty()Return the name of the property that is required.voidsetProperty(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 Detail
-
RequiredArgumentException
public RequiredArgumentException(String message, String property)
Construct with a message and property.
-
RequiredArgumentException
public RequiredArgumentException(Exception e)
Construct with an exception.
-
RequiredArgumentException
public RequiredArgumentException(String message, Exception e)
Construct with a message and exception.
-
-
Method Detail
-
getProperty
public String getProperty()
Return the name of the property that is required.
-
setProperty
public void setProperty(String property)
Set the name of the required property.
-
-