(report: ErrorReport)
| 48 | |
| 49 | /** Announce a report to every listener. Never throws. */ |
| 50 | export function reportError(report: ErrorReport): void { |
| 51 | for (const listener of listeners) { |
| 52 | try { |
| 53 | listener(report); |
| 54 | } catch { |
| 55 | /* A listener that fails must not turn one error into two. */ |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | /** The stack of an unknown thrown value, when it has one. */ |
| 61 | export function stackOf(error: unknown): string | undefined { |
no outgoing calls
no test coverage detected