Class InvalidURIException

All Implemented Interfaces:
Serializable

public class InvalidURIException extends IllegalArgumentException
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 IllegalArgumentExceptions 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 Details

    • InvalidURIException

      public InvalidURIException(URISyntaxException e)
      Construct a new InvalidURIException from a URISyntaxException.
      Parameters:
      e - The URISyntaxException.
    • InvalidURIException

      public InvalidURIException(String message, URISyntaxException e)
      Construct a new InvalidURIException from a URISyntaxException.
      Parameters:
      message - The message indicating why the term is in error.
      e - The URISyntaxException.
    • InvalidURIException

      public InvalidURIException(MalformedURLException e)
      Construct a new InvalidURIException from a MalformedURLException.
      Parameters:
      e - The MalformedURLException.
    • InvalidURIException

      public InvalidURIException(String message, MalformedURLException e)
      Construct a new InvalidURIException from a MalformedURLException.
      Parameters:
      message - The message indicating why the term is in error.
      e - The MalformedURLException.