Added in API level 26
    DateTimeParseException
open class DateTimeParseException : DateTimeException
| kotlin.Any | |||||
| ↳ | kotlin.Throwable | ||||
| ↳ | java.lang.Exception | ||||
| ↳ | java.lang.RuntimeException | ||||
| ↳ | java.time.DateTimeException | ||||
| ↳ | java.time.format.DateTimeParseException | ||||
An exception thrown when an error occurs during parsing.
This exception includes the text being parsed and the error index.
Summary
| Public constructors | |
|---|---|
| DateTimeParseException(message: String!, parsedData: CharSequence!, errorIndex: Int)Constructs a new exception with the specified message. | |
| DateTimeParseException(message: String!, parsedData: CharSequence!, errorIndex: Int, cause: Throwable!)Constructs a new exception with the specified message and cause. | |
| Public methods | |
|---|---|
| open Int | Returns the index where the error was found. | 
| open String! | Returns the string that was being parsed. | 
Public constructors
DateTimeParseException
Added in API level 26
      DateTimeParseException(
message: String!,
parsedData: CharSequence!,
errorIndex: Int)
Constructs a new exception with the specified message.
| Parameters | |
|---|---|
| message | String!: the message to use for this exception, may be null | 
| parsedData | CharSequence!: the parsed text, should not be null | 
| errorIndex | Int: the index in the parsed string that was invalid, should be a valid index | 
DateTimeParseException
Added in API level 26
      DateTimeParseException(
message: String!,
parsedData: CharSequence!,
errorIndex: Int,
cause: Throwable!)
Constructs a new exception with the specified message and cause.
| Parameters | |
|---|---|
| message | String!: the message to use for this exception, may be null | 
| parsedData | CharSequence!: the parsed text, should not be null | 
| errorIndex | Int: the index in the parsed string that was invalid, should be a valid index | 
| cause | Throwable!: the cause exception, may be null | 
Public methods
getErrorIndex
Added in API level 26
      open fun getErrorIndex(): Int
Returns the index where the error was found.
| Return | |
|---|---|
| Int | the index in the parsed string that was invalid, should be a valid index | 
getParsedString
Added in API level 26
      open fun getParsedString(): String!
Returns the string that was being parsed.
| Return | |
|---|---|
| String! | the string that was being parsed, should not be null. | 
