Stay organized with collections
Save and categorize content based on your preferences.
ParseException
open class ParseException : Exception
Signals that an error has been reached unexpectedly while parsing.
Summary
Public constructors |
Constructs a ParseException with the specified detail message and offset.
|
Public methods |
open Int |
Returns the position where the error was found.
|
Public constructors
ParseException
ParseException(
s: String!,
errorOffset: Int)
Constructs a ParseException with the specified detail message and offset. A detail message is a String that describes this particular exception.
Parameters |
s |
String!: the detail message |
errorOffset |
Int: the position where the error is found while parsing. |
Public methods
getErrorOffset
open fun getErrorOffset(): Int
Returns the position where the error was found.
Return |
Int |
the position where the error was found |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# ParseException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nParseException\n==============\n\n```\nopen class ParseException : Exception\n```\n\n|---|---|---|-------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||||\n| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html) |||\n| | ↳ | [java.lang.Exception](../lang/Exception.html#) ||\n| | | ↳ | [java.text.ParseException](#) |\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [StringPrepParseException](../../android/icu/text/StringPrepParseException.html#) |-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------| | [StringPrepParseException](../../android/icu/text/StringPrepParseException.html#) | Exception that signals an error has occurred while parsing the input to StringPrep or IDNA. | |\n\nSignals that an error has been reached unexpectedly while parsing.\n\nSummary\n-------\n\n| Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [ParseException](#ParseException(kotlin.String,%20kotlin.Int))`(`s:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `errorOffset:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Constructs a ParseException with the specified detail message and offset. |\n\n| Public methods ||\n|---------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getErrorOffset](#getErrorOffset())`()` Returns the position where the error was found. |\n\nPublic constructors\n-------------------\n\n### ParseException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nParseException(\n s: String!, \n errorOffset: Int)\n```\n\nConstructs a ParseException with the specified detail message and offset. A detail message is a String that describes this particular exception.\n\n| Parameters ||\n|---------------|----------------------------------------------------------------------------------------------------------------------------------|\n| `s` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: the detail message |\n| `errorOffset` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the position where the error is found while parsing. |\n\nPublic methods\n--------------\n\n### getErrorOffset\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getErrorOffset(): Int\n```\n\nReturns the position where the error was found.\n\n| Return ||\n|----------------------------------------------------------------------------|----------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the position where the error was found |"]]