HaltException

class HaltException: TuPrologRuntimeException

An exception thrown if there are problems during state machine execution, and solution process should be halted

Fields

Name Description
val exitStatus: Int

The integer code representing the exit status code; it defaults to 1

Constructors

<init>

constructor(cause: Throwable?, context: ExecutionContext, exitStatus: Int)

Parameters

Name Description
cause: Throwable?
context: ExecutionContext
exitStatus: Int

<init>

constructor(message: String?, cause: Throwable?, context: ExecutionContext, exitStatus: Int)

An exception thrown if there are problems during state machine execution, and solution process should be halted

Parameters

Name Description
message: String?

the detail message string.

cause: Throwable?

the cause of this exception.

context: ExecutionContext

The current context at exception creation

exitStatus: Int

The integer code representing the exit status code; it defaults to 1

Methods

updateContext

fun updateContext(newContext: ExecutionContext): HaltException

Creates a new exception instance with context field updated to newContext.

Subclasses should override this method and return the correct instance.

Parameters

Name Description
newContext: ExecutionContext

ReturnValue

Name Description
HaltException