ParseException
open class ParseException(var input: Any?, var offendingSymbol: String?, var line: Int, var column: Int, message: String?, throwable: Throwable?) : TuPrologException
Reports a failure while turning Prolog source into a tuProlog domain object.
This is the stable exception boundary of parser-core and parser-theory. Low-level lexical and syntactic failures from parser-impl are retained as cause, while their diagnostic data is projected onto this type. Consequently, line and column are one-based even though the source positions used by parser-impl are zero-based.
clauseIndex is set by theory parsers and readers to the zero-based index of the clause that failed. It remains -1 when no clause index applies.
Parameters
message
human-readable description of the failure
throwable
lower-level cause, normally a typed parser-impl syntax exception