InitializationIssue

class InitializationIssue(val goal: Struct, val cause: ResolutionException? = null, contexts: Array<ExecutionContext>) : Warning

A Warning reported when solving an initialization goal (i.e. a directive, or a clause loaded while partitioning a it.unibo.tuprolog.theory.Theory's static/dynamic clauses at knowledge-base load time) does not succeed -- either because it failed outright (no cause) or because it halted with cause.

Raised instead of aborting the whole knowledge-base loading process, so that a single misbehaving directive does not prevent the rest of the theory from being loaded.

Constructors

Link copied to clipboard
constructor(goal: Struct, cause: ResolutionException? = null, contexts: Array<ExecutionContext>)
constructor(goal: Struct, cause: ResolutionException? = null, context: ExecutionContext)

Properties

Link copied to clipboard
open override val cause: ResolutionException?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The exception stacktrace; shorthand for context.prologStackTrace

Link copied to clipboard
expect open val message: String?

Functions

Link copied to clipboard
open override fun pushContext(newContext: ExecutionContext): InitializationIssue
Link copied to clipboard
open override fun updateContext(newContext: ExecutionContext, index: Int = 0): InitializationIssue

Creates a new exception instance with the context with in position index updated to newContext. Subclasses should override this method and return the correct instance.

Link copied to clipboard