SystemError

class SystemError: LogicError

The system error occurs when an internal problem occurred and if not caught, it will halt inferential machine

Constructors

<init>

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

Parameters

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

<init>

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

The system error occurs when an internal problem occurred and if not caught, it will halt inferential machine

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

extraData: Term?

The possible extra data to be carried with the error

Methods

updateContext

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

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
SystemError

updateLastContext

fun updateLastContext(newContext: ExecutionContext): SystemError

Parameters

Name Description
newContext: ExecutionContext

ReturnValue

Name Description
SystemError

pushContext

fun pushContext(newContext: ExecutionContext): SystemError

Parameters

Name Description
newContext: ExecutionContext

ReturnValue

Name Description
SystemError

CompanionObject

SystemError

class SystemError: LogicError

The system error occurs when an internal problem occurred and if not caught, it will halt inferential machine

Fields

Name Description
const typeFunctor: String

The system error Struct functor

Methods

forUncaughtException

fun forUncaughtException(context: ExecutionContext, exception: Throwable): SystemError

Parameters

Name Description
context: ExecutionContext
exception: Throwable

ReturnValue

Name Description
SystemError

forUncaughtException

fun forUncaughtException(context: ExecutionContext, exception: Term): SystemError

Parameters

Name Description
context: ExecutionContext
exception: Term

ReturnValue

Name Description
SystemError

forUncaughtError

fun forUncaughtError(exception: LogicError): SystemError

Parameters

Name Description
exception: LogicError

ReturnValue

Name Description
SystemError