java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
io.helidon.common.uri.UriValidationException
- All Implemented Interfaces:
Serializable
A URI validation exception.
This type provides access to the invalid value that is not cleaned, through invalidValue().
The exception message is cleaned and can be logged and returned to users (Throwable.getMessage()).
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSegment of the URI that caused this validation failure. -
Constructor Summary
ConstructorsConstructorDescriptionUriValidationException(UriValidationException.Segment segment, char[] invalidValue, String message) Create a new validation exception that uses a descriptive message and the failed chars. -
Method Summary
Modifier and TypeMethodDescriptionchar[]The value that did not pass validation.segment()Segment that caused this validation exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
UriValidationException
public UriValidationException(UriValidationException.Segment segment, char[] invalidValue, String message) Create a new validation exception that uses a descriptive message and the failed chars. The message provided will be appended with cleaned invalid value in double quotes.- Parameters:
segment- segment that caused this exceptioninvalidValue- value that failed validationmessage- descriptive message
-
-
Method Details
-
invalidValue
public char[] invalidValue()The value that did not pass validation. This value is as it was received over the network, so it is not safe to log or return to the user!- Returns:
- invalid value that failed validation
-
segment
Segment that caused this validation exception.- Returns:
- segment of the URI
-