ErrorCapableNode

A Node that can hold an error which occurred during its processing (e.g. function call expansion). When an error is present, accept accepts the error as a node (via asNode) instead of the node itself, allowing graceful inline error reporting in the output document.

Inheritors

Properties

Link copied to clipboard

The error that occurred during processing, paired with the PipelineErrorHandler strategy to handle it. If null, no error occurred and the node is rendered normally via acceptOnSuccess.

Functions

Link copied to clipboard
open override fun <T> accept(visitor: NodeVisitor<T>): T

Accepts the error as a node if an error is present, otherwise accepts this node normally via acceptOnSuccess.

Link copied to clipboard
abstract fun <T> acceptOnSuccess(visitor: NodeVisitor<T>): T

Visits this node with the given visitor when no error is present.

Link copied to clipboard

Retrieves the stored media associated with this node, if any.

Link copied to clipboard
fun ErrorCapableNode.setError(throwable: Throwable, context: Context)

Sets the given throwable as the error of this node, paired with the error handler from context.

Link copied to clipboard