yera.runtime.handlers.fallback

Fallback handler: pretty-prints unrecognised event blocks as JSON.

Symbols

class FallbackHandler — Renders unregistered block types by printing their JSON payload to the console.

FallbackHandler

Inherits: BaseHandler

Renders unregistered block types by printing their JSON payload to the console.

Methods

__init__ — Initialize the fallback handler with its destination console.
push — Print the block type warning and JSON-serialised event data to the console.

FallbackHandler.__init__

__init__(
    console: Console,
) → None

Initialize the fallback handler with its destination console.

Parameters

console
type: Console

Rich console used to report unsupported block types.

FallbackHandler.push

push(
    event: OutputEvent,
) → None

Print the block type warning and JSON-serialised event data to the console.

Parameters

event
type: OutputEvent

The unrecognised output event to render.