base
_base
Shared error-handling helpers for axm_ast tool implementations.
log_and_fallback(logger, exc, fallback)
Log an exception at WARNING with exc_info and return fallback.
Used inside helpers that return a dict (or other structured value)
instead of a ToolResult — they can't use :func:safe_execute but
still need centralized logging on the failure boundary.
Source code in packages/axm-ast/src/axm_ast/tools/_base.py
safe_execute(method)
Wrap a tool execute method to log + return structured failures.
The wrapper logs any uncaught exception at WARNING on the calling
module's logger with exc_info=True, then returns a
ToolResult(success=False, error=str(exc)) so callers never see a
raised exception.