UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

18 lines (17 loc) • 516 B
//#region src/infra/error-graph-internal.ts /** Retained errors must not keep callers alive through V8's lazy stack frames. */ function materializeErrorStack(failure) { let error = failure; const seen = /* @__PURE__ */ new Set(); while (error instanceof Error && !seen.has(error)) { seen.add(error); try { error.stack = String(error.stack); } catch { error.stack = "Stack trace unavailable: custom formatter failed"; } error = error.cause; } } //#endregion export { materializeErrorStack as t };