Added in API level 1

URISyntaxException

open class URISyntaxException : Exception
kotlin.Any
   ↳ kotlin.Throwable
   ↳ java.lang.Exception
   ↳ java.net.URISyntaxException

Checked exception thrown to indicate that a string could not be parsed as a URI reference.

Summary

Public constructors
URISyntaxException(input: String!, reason: String!, index: Int)

Constructs an instance from the given input string, reason, and error index.

URISyntaxException(input: String!, reason: String!)

Constructs an instance from the given input string and reason.

Public methods
open Int

Returns an index into the input string of the position at which the parse error occurred, or -1 if this position is not known.

open String!

Returns the input string.

open String!

Returns a string explaining why the input string could not be parsed.

Properties
open String?

Returns a string describing the parse error.

Public constructors

URISyntaxException

Added in API level 1
URISyntaxException(
    input: String!,
    reason: String!,
    index: Int)

Constructs an instance from the given input string, reason, and error index.

Parameters
input String!: The input string
reason String!: A string explaining why the input could not be parsed
index Int: The index at which the parse error occurred, or -1 if the index is not known
Exceptions
java.lang.NullPointerException If either the input or reason strings are null
java.lang.IllegalArgumentException If the error index is less than -1

URISyntaxException

Added in API level 1
URISyntaxException(
    input: String!,
    reason: String!)

Constructs an instance from the given input string and reason. The resulting object will have an error index of -1.

Parameters
input String!: The input string
reason String!: A string explaining why the input could not be parsed
Exceptions
java.lang.NullPointerException If either the input or reason strings are null

Public methods

getIndex

Added in API level 1
open fun getIndex(): Int

Returns an index into the input string of the position at which the parse error occurred, or -1 if this position is not known.

Return
Int The error index

getInput

Added in API level 1
open fun getInput(): String!

Returns the input string.

Return
String! The input string

getReason

Added in API level 1
open fun getReason(): String!

Returns a string explaining why the input string could not be parsed.

Return
String! The reason string

Properties

message

Added in API level 1
open val message: String?

Returns a string describing the parse error. The resulting string consists of the reason string followed by a colon character (':'), a space, and the input string. If the error index is defined then the string " at index " followed by the index, in decimal, is inserted after the reason string and before the colon character.

Return
String? A string describing the parse error