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 booleandefault Iterator<ConversionError>iterator()default voidReject the version with the given exception.default voidReject 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:
iteratorin interfaceIterable<ConversionError>
-
getLastError
Obtain the last error.- Returns:
- The error
-
hasErrors
default boolean hasErrors()- Returns:
- Check whether errors exist
-