java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
org.cruk.clarity.api.InvalidURIException
- All Implemented Interfaces:
Serializable
Exception raised when a
URI
or URL
object is created
from a string but the string isn't a valid URI or URL.
This is a RuntimeException that is used in place of the typed
URISyntaxException
or MalformedURLException
from within
the Clarity API client. We don't expect these to actually happen if
the client is configured properly, so handling them as typed exceptions
on every call is burdensome. Prior to release 2.31.2 these errors came
out as general IllegalArgumentException
s or in one case an
AssertionError
. This class provides a specific and
consistent type for such errors that wouldn't be expected from a
correctly configured program.
- Since:
- v2.31.2
- See Also:
-
Constructor Summary
ConstructorDescriptionInvalidURIException
(String message, MalformedURLException e) Construct a new InvalidURIException from a MalformedURLException.InvalidURIException
(String message, URISyntaxException e) Construct a new InvalidURIException from a URISyntaxException.Construct a new InvalidURIException from a MalformedURLException.Construct a new InvalidURIException from a URISyntaxException. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidURIException
Construct a new InvalidURIException from a URISyntaxException.- Parameters:
e
- The URISyntaxException.
-
InvalidURIException
Construct a new InvalidURIException from a URISyntaxException.- Parameters:
message
- The message indicating why the term is in error.e
- The URISyntaxException.
-
InvalidURIException
Construct a new InvalidURIException from a MalformedURLException.- Parameters:
e
- The MalformedURLException.
-
InvalidURIException
Construct a new InvalidURIException from a MalformedURLException.- Parameters:
message
- The message indicating why the term is in error.e
- The MalformedURLException.
-