InvalidLiteralException

Thrown by it.unibo.tuprolog.datalog.asLiteral when a Term cannot be interpreted as a Prolog/Datalog literal (a callable goal): only a it.unibo.tuprolog.core.Struct or a it.unibo.tuprolog.core.Var can occur as a literal (the latter is wrapped into a call/1 goal), so e.g. a bare number or list argument found where a body goal or head was expected triggers this exception.

Parameters

literal

the offending Term.

clause

the Clause the offending literal was found in, if known.

Constructors

Link copied to clipboard
constructor(literal: Term, clause: Clause?, cause: Throwable? = null)
constructor(literal: Term, cause: Throwable? = null)

Shorthand for InvalidLiteralException(literal, null, cause), when no owning Clause is known.

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
expect open val message: String?