Monday, March 16, 2015

URISyntaxException

java.net.URISyntaxException

URISyntaxException is described in the javadoc comments as:

Checked exception thrown to indicate that a string could not be parsed as a URI reference.
author: Mark Reinhold version: 1.5, 03/12/19 see: URI

Where is this exception thrown?

Following, is a list of exception messages cross-referenced to the source code responsible for throwing them. Click on the method link to view the code and see how the exception is thrown.

How is this exception thrown?

The following sub-sections identify where this exception is thrown, and how (or why) the code is throwing the exception.

Any source code quoted in this section is subject to the Java Research License unless stated otherwise.

java.net.URI.checkPath(String, String, String)

private static void checkPath(String s, String scheme, String path) throws URISyntaxException {
    if (scheme != null) {
        if ((path != null) && ((path.length() > 0) && (path.charAt(0) != '/'))) throw new URISyntaxException(s, 'Relative path in absolute URI');
    }
}

Source: "Java SE Downloads: Java SE 6 JDK Source Code", at: http://www.oracle.com/technetwork/java/javase/downloads/index.html

No comments:

Post a Comment