KbRenderException

class KbRenderException(cause: Throwable, location: KbSourceLocation? = null, errorCode: String = "KB-0000") : KbException(source)

Thrown by KbTemplate.render when the template source parses successfully but a fatal error occurs at render time.

Render-time hard failures include: an unknown transform name, a malformed assign target, and internal structural invariant violations. These are template-dependent (knowable at template test time) and independent of input data.

The cause is the underlying error; message is forwarded from it (with location appended when present).

Parameters

cause

the underlying exception that describes the error.

location

the template position of the failing expression, or null when it could not be determined.

errorCode

the stable conformance error code for this failure; see KbException.errorCode.

Constructors

Link copied to clipboard
constructor(cause: Throwable, location: KbSourceLocation? = null, errorCode: String = "KB-0000")

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard

the stable conformance error code for this failure (e.g. "KB-2001"), or "KB-0000" for unclassified failures.

Link copied to clipboard

the template position the failure is attributable to, or null when none could be determined.

Link copied to clipboard
override val message: String

the exception message, always non-null; includes the template position when location is non-null.