HookConfig#
- class brainstate.HookConfig(on_error='log', error_logger=None, max_errors_per_hook=10, disable_on_error=False)[source]#
Configuration for hook error handling and behavior.
- on_error#
How to handle hook execution errors: - ‘raise’: Propagate the exception to the caller - ‘log’: Log the error and continue (default) - ‘ignore’: Silently ignore errors
- error_logger#
Optional custom error logging function
- max_errors_per_hook#
Maximum errors before auto-disabling (default 10)
- disable_on_error#
Whether to auto-disable hooks after max errors (default False)