Stay organized with collections
Save and categorize content based on your preferences.
LSException
open class LSException : RuntimeException
Parser or write operations may throw an LSException
if the processing is stopped. The processing can be stopped due to a DOMError
with a severity of DOMError.SEVERITY_FATAL_ERROR
or a non recovered DOMError.SEVERITY_ERROR
, or if DOMErrorHandler.handleError()
returned false
.
Note: As suggested in the definition of the constants in the DOMError
interface, a DOM implementation may choose to continue after a fatal error, but the resulting DOM tree is then implementation dependent.
See also the Document Object Model (DOM) Level 3 Load and Save Specification.
Summary
Constants |
static Short |
If an attempt was made to load a document, or an XML Fragment, using LSParser and the processing has been stopped.
|
static Short |
If an attempt was made to serialize a Node using LSSerializer and the processing has been stopped.
|
Constants
PARSE_ERR
static val PARSE_ERR: Short
If an attempt was made to load a document, or an XML Fragment, using LSParser
and the processing has been stopped.
Value: 81
SERIALIZE_ERR
static val SERIALIZE_ERR: Short
If an attempt was made to serialize a Node
using LSSerializer
and the processing has been stopped.
Value: 82
Public constructors
LSException
LSException(
code: Short,
message: String!)
Properties
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# LSException\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nLSException\n===========\n\n```\nopen class LSException : RuntimeException\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](../../../../java/lang/Exception.html#) |||\n| | | ↳ | [java.lang.RuntimeException](../../../../java/lang/RuntimeException.html#) ||\n| | | | ↳ | [org.w3c.dom.ls.LSException](#) |\n\nParser or write operations may throw an `LSException` if the processing is stopped. The processing can be stopped due to a `DOMError` with a severity of `DOMError.SEVERITY_FATAL_ERROR` or a non recovered `DOMError.SEVERITY_ERROR`, or if `DOMErrorHandler.handleError()` returned `false`.\n\n**Note:** As suggested in the definition of the constants in the `DOMError` interface, a DOM implementation may choose to continue after a fatal error, but the resulting DOM tree is then implementation dependent.\n\nSee also the [Document Object Model (DOM) Level 3 Load and Save Specification](http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407).\n\nSummary\n-------\n\n| Constants ||\n|---------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [Short](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short/index.html) | [PARSE_ERR](#PARSE_ERR:kotlin.Short) If an attempt was made to load a document, or an XML Fragment, using `LSParser` and the processing has been stopped. |\n| static [Short](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short/index.html) | [SERIALIZE_ERR](#SERIALIZE_ERR:kotlin.Short) If an attempt was made to serialize a `Node` using `LSSerializer` and the processing has been stopped. |\n\n| Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [LSException](#LSException(kotlin.Short,%20kotlin.String))`(`code:` `[Short](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short/index.html)`, `message:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` \u003cbr /\u003e |\n\n| Properties ||\n|--------------------------------------------------------------------------------|-----------------------------------|\n| [Short](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short/index.html) | [code](#code:kotlin.Short) \u003cbr /\u003e |\n\nConstants\n---------\n\n### PARSE_ERR\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val PARSE_ERR: Short\n```\n\nIf an attempt was made to load a document, or an XML Fragment, using `LSParser` and the processing has been stopped. \n\n Value: 81\n\n### SERIALIZE_ERR\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val SERIALIZE_ERR: Short\n```\n\nIf an attempt was made to serialize a `Node` using `LSSerializer` and the processing has been stopped. \n\n Value: 82\n\nPublic constructors\n-------------------\n\n### LSException\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nLSException(\n code: Short, \n message: String!)\n```\n\nProperties\n----------\n\n### code\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar code: Short\n```"]]