MCPcopy Index your code
hub / github.com/angular/angular / safeAsync

Function safeAsync

packages/zone.js/lib/zone-spec/fake-async-test.ts:1150–1156  ·  view source on GitHub ↗
(fn: () => Promise<void>)

Source from the content-addressed store, hash-verified

1148}
1149
1150async function safeAsync(fn: () => Promise<void>): Promise<void> {
1151 try {
1152 return await fn();
1153 } catch (e) {
1154 hostReportError(e);
1155 }
1156}
1157
1158function hostReportError(e: unknown) {
1159 Zone.root.run(() => {

Callers 1

Calls 2

hostReportErrorFunction · 0.85
fnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…