commonMain.com.fleeksoft.ksoup.parser.ParseError.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ksoup-jvm Show documentation
Show all versions of ksoup-jvm Show documentation
Ksoup is a Kotlin Multiplatform library for working with HTML and XML, and offers an easy-to-use API for URL fetching, data parsing, extraction, and manipulation using DOM and CSS selectors.
The newest version!
package com.fleeksoft.ksoup.parser
/**
* A Parse Error records an error in the input HTML that occurs in either the tokenisation or the tree building phase.
*/
internal class ParseError {
val pos: Int
val cursorPos: String
val errorMsg: String
internal constructor(reader: CharacterReader, errorMsg: String) {
pos = reader.pos()
cursorPos = reader.posLineCol()
this.errorMsg = errorMsg
}
internal constructor(pos: Int, errorMsg: String) {
this.pos = pos
cursorPos = pos.toString()
this.errorMsg = errorMsg
}
override fun toString(): String {
return "<$cursorPos>: $errorMsg"
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy