OopException

The base type for every error :oop-lib can run into while bridging Prolog and JVM/Kotlin reflection -- e.g. an unresolvable method/constructor/property overload, a malformed alias expression, or a reflective operation actually throwing.

An OopException is a plain Kotlin Throwable (so it can be thrown from ordinary code, such as a it.unibo.tuprolog.solve.libs.oop.Ref implementation), but every subtype knows how to turn itself into the it.unibo.tuprolog.solve.exception.LogicError a it.unibo.tuprolog.solve.Solver actually throws -- via toLogicError -- which is what it.unibo.tuprolog.solve.libs.oop.primitives.catchingOopExceptions does for every primitive in this library.

See also

Inheritors

Constructors

Link copied to clipboard
constructor(message: String? = null, cause: Throwable? = null)
constructor(cause: Throwable?)

Types

Link copied to clipboard
object Companion

Properties

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

Functions

Link copied to clipboard
abstract fun toLogicError(context: ExecutionContext, signature: Signature): LogicError

Converts this exception into the LogicError that should actually be thrown by context's solver, while executing signature.