MCPcopy Create free account
hub / github.com/ehmicky/log-process-errors / resolveValue

Function resolveValue

src/events.js:35–45  ·  view source on GitHub ↗
(value, event)

Source from the content-addressed store, hash-verified

33// `rejectionHandled` pass a `Promise` as argument. The other events pass the
34// main value as is.
35const resolveValue = async (value, event) => {
36 if (event !== 'rejectionHandled') {
37 return value
38 }
39
40 try {
41 return await value
42 } catch (error) {
43 return error
44 }
45}
46
47// With `--unhandled-rejections=strict`, `unhandledRejection` also emits an
48// `uncaughtException` event. We discard it to avoid repetitions.

Callers 1

handleEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…