of

fun of(message: String? = null, cause: Throwable? = null, context: ExecutionContext, type: Struct, extraData: Term? = null): PrologError

Factory method for PrologErrors

It creates correct subclass instance if type detected, otherwise defaulting to a PrologError instance

fun of(message: String? = null, cause: Throwable? = null, contexts: Array<ExecutionContext>, type: Struct, extraData: Term? = null): PrologError