OopRuntimeException

class OopRuntimeException(callable: KCallable<*>, receiver: Any?, inner: Throwable) : OopException

Wraps whatever Throwable itself threw while being reflectively invoked on receiver -- e.g. a NullPointerException from calling a method on a null-valued field, or any other exception the invoked JVM/Kotlin code raises. On the JVM this unwraps the java.lang.reflect.InvocationTargetException reflection wraps such failures in, so cause is the original exception thrown by the invoked code, not the reflection machinery's own wrapper.

Surfaces to Prolog as a it.unibo.tuprolog.solve.exception.error.SystemError for an uncaught exception (see it.unibo.tuprolog.solve.exception.error.SystemError.forUncaughtException).

Parameters

callable

the member whose invocation threw.

receiver

the instance callable was being invoked on, or null for a constructor, static member, or companion-object member.

inner

the exception thrown by the invoked code.

Constructors

Link copied to clipboard
constructor(callable: KCallable<*>, receiver: Any?, inner: Throwable)

Properties

Link copied to clipboard
open override val cause: Throwable
Link copied to clipboard
open override val message: String

Functions

Link copied to clipboard
open override 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.