KbSoftFailEvent

class KbSoftFailEvent(val category: KbSoftFailEvent.Category, val problem: String, val input: String?, val transformName: String?, val location: KbSourceLocation?)(source)

A structured description of a single soft failure that occurred while rendering a KbTemplate.

A soft failure is a problem tied to the input data (the context, environment properties, a value piped through a transform, or a value passed as a transform argument) that the engine recovers from by evaluating to null or the empty value rather than raising. Soft failures are reported to the KbEventListener registered on the rendering environment; callers that register no listener observe no events and rendering behaves exactly as before.

Constructors

Link copied to clipboard
constructor(category: KbSoftFailEvent.Category, problem: String, input: String?, transformName: String?, location: KbSourceLocation?)

Types

Link copied to clipboard

The kind of soft failure, each carrying an inherent severity and a stable code.

Link copied to clipboard

Coarse log level for a KbSoftFailEvent, used by listeners to decide what to surface.

Properties

Link copied to clipboard

the kind of soft failure; also fixes the severity.

Link copied to clipboard

the rendered string form of the value that triggered the failure, or null when no single value applies (for example, an unresolved identifier reference).

Link copied to clipboard

where in the template source the failing expression resides, or null when no source location could be captured.

Link copied to clipboard

a short human-readable description of the specific problem (for example, "abs: non-numeric input").

Link copied to clipboard

The severity of this event, derived from its category.

Link copied to clipboard

the name of the transform that reported the failure, or null when the failure did not occur inside a transform (for example, an identifier miss or a binary comparison).