ExistenceError

class ExistenceError: LogicError

The existence error occurs when an object on which an operation is to be performed does not exist

Fields

Name Description
val type: Struct

The error type structure

val expectedObject: ObjectType

The type of the missing object

val culprit: Term

The object whose lack caused the error

Constructors

<init>

constructor(message: String?, cause: Throwable?, context: ExecutionContext, expectedObject: ObjectType, actualValue: Term, extraData: Term?)

Parameters

Name Description
message: String?
cause: Throwable?
context: ExecutionContext
expectedObject: ObjectType
actualValue: Term
extraData: Term?

<init>

constructor(message: String?, cause: Throwable?, contexts: Array<ExecutionContext>, expectedObject: ObjectType, culprit: Term, extraData: Term?)

The existence error occurs when an object on which an operation is to be performed does not exist

Parameters

Name Description
message: String?

the detail message string.

cause: Throwable?

the cause of this exception.

contexts: Array<ExecutionContext>

a stack of contexts localising the exception

expectedObject: ObjectType

The type of the missing object

culprit: Term

The object whose lack caused the error

extraData: Term?

The possible extra data to be carried with the error

Methods

updateContext

fun updateContext(newContext: ExecutionContext, index: Int): ExistenceError

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.

Parameters

Name Description
newContext: ExecutionContext
index: Int

ReturnValue

Name Description
ExistenceError

updateLastContext

fun updateLastContext(newContext: ExecutionContext): ExistenceError

Parameters

Name Description
newContext: ExecutionContext

ReturnValue

Name Description
ExistenceError

pushContext

fun pushContext(newContext: ExecutionContext): ExistenceError

Parameters

Name Description
newContext: ExecutionContext

ReturnValue

Name Description
ExistenceError

CompanionObject

ExistenceError

class ExistenceError: LogicError

The existence error occurs when an object on which an operation is to be performed does not exist

Fields

Name Description
const typeFunctor: String

The existence error Struct functor

Methods

of

fun of(context: ExecutionContext, expectedType: ObjectType, culprit: Term, message: String): ExistenceError

Parameters

Name Description
context: ExecutionContext
expectedType: ObjectType
culprit: Term
message: String

ReturnValue

Name Description
ExistenceError

forProcedure

fun forProcedure(context: ExecutionContext, procedure: Signature): ExistenceError

Parameters

Name Description
context: ExecutionContext
procedure: Signature

ReturnValue

Name Description
ExistenceError

forSourceSink

fun forSourceSink(context: ExecutionContext, alias: Atom): ExistenceError

Parameters

Name Description
context: ExecutionContext
alias: Atom

ReturnValue

Name Description
ExistenceError

forSourceSink

fun forSourceSink(context: ExecutionContext, alias: String): ExistenceError

Parameters

Name Description
context: ExecutionContext
alias: String

ReturnValue

Name Description
ExistenceError

forStream

fun forStream(context: ExecutionContext, steamTerm: Struct): ExistenceError

Parameters

Name Description
context: ExecutionContext
steamTerm: Struct

ReturnValue

Name Description
ExistenceError

forResource

fun forResource(context: ExecutionContext, name: String): ExistenceError

Parameters

Name Description
context: ExecutionContext
name: String

ReturnValue

Name Description
ExistenceError