simvx.editor.error_recovery

Error handling for scene instantiation and hot reload.

Module Contents

Classes

ErrorRecovery

Manages error state for nodes that fail during instantiation or reload.

Data

log

API

simvx.editor.error_recovery.log

‘getLogger(…)’

class simvx.editor.error_recovery.ErrorRecovery[source]

Manages error state for nodes that fail during instantiation or reload.

When a class init raises, the node is marked with _script_error = True. The editor shows a red indicator and the traceback in the output panel. When the file is fixed and hot-reloaded, the node is re-instantiated.

Initialization

mark_errored(node: simvx.core.Node, tb: str)[source]

Mark a node as errored with traceback info.

clear_error(node: simvx.core.Node)[source]

Clear error state on a node (after successful reload).

property errored_nodes: list[tuple[simvx.core.Node, str]][source]

All errored nodes with their tracebacks.

try_reinstantiate(node: simvx.core.Node, cls: type) simvx.core.Node | None[source]

Try to re-instantiate an errored node with a (potentially fixed) class.

Returns the new node on success, or None if the class still raises.