Package io.micronaut.core.convert
Interface ErrorsContext
- All Superinterfaces:
Iterable<ConversionError>
- All Known Subinterfaces:
ArgumentConversionContext<T>
,ConversionContext
,ImmutableArgumentConversionContext<T>
Interface for reporting conversion errors.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Method Summary
Modifier and TypeMethodDescriptiondefault Optional<ConversionError>
Obtain the last error.default boolean
default Iterator<ConversionError>
iterator()
default void
Reject the version with the given exception.default void
Reject the version with the given exception.Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
reject
Reject the version with the given exception.- Parameters:
exception
- The exception
-
reject
Reject the version with the given exception.- Parameters:
value
- The original valueexception
- The exception
-
iterator
- Specified by:
iterator
in interfaceIterable<ConversionError>
-
getLastError
Obtain the last error.- Returns:
- The error
-
hasErrors
default boolean hasErrors()- Returns:
- Check whether errors exist
-