MCPcopy Index your code
hub / github.com/andywer/threads.js / errors

Function errors

src/master/thread.ts:14–16  ·  view source on GitHub ↗

Return an observable that can be used to subscribe to all errors happening in the thread.

(thread: ThreadT)

Source from the content-addressed store, hash-verified

12export const Thread = {
13 /** Return an observable that can be used to subscribe to all errors happening in the thread. */
14 errors<ThreadT extends ThreadType>(thread: ThreadT): Observable<Error> {
15 return thread[$errors] || fail("Error observable not found. Make sure to pass a thread instance as returned by the spawn() promise.")
16 },
17 /** Return an observable that can be used to subscribe to internal events happening in the thread. Useful for debugging. */
18 events<ThreadT extends ThreadType>(thread: ThreadT): Observable<WorkerEvent> {
19 return thread[$events] || fail("Events observable not found. Make sure to pass a thread instance as returned by the spawn() promise.")

Callers

nothing calls this directly

Calls 1

failFunction · 0.70

Tested by

no test coverage detected