Skip to content

Commit 8c658e2

Browse files
authored
Merge branch 'main' into lint-fixes
2 parents 875b787 + b2c869f commit 8c658e2

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/worker-thread/function.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ export function callFunctionMessageHandler(event: MessageEvent, document: Docume
2525
TransferrableMutationType.FUNCTION_CALL,
2626
ResolveOrReject.REJECT,
2727
index,
28-
store(JSON.stringify(`[worker-dom]: Exported function "${fnIdentifier}" could not be found.`)),
28+
store(JSON.stringify({
29+
stack: '',
30+
message: `[worker-dom]: Exported function "${fnIdentifier}" could not be found.`
31+
})),
2932
]);
3033
return;
3134
}
@@ -43,7 +46,10 @@ export function callFunctionMessageHandler(event: MessageEvent, document: Docume
4346
TransferrableMutationType.FUNCTION_CALL,
4447
ResolveOrReject.REJECT,
4548
index,
46-
store(JSON.stringify(`[worker-dom]: Function "${fnIdentifier}" threw: "${errorMessage}"`)),
49+
store(JSON.stringify({
50+
stack: err.stack || '',
51+
message: `[worker-dom]: Function "${fnIdentifier}" threw: "${errorMessage}"`
52+
}))
4753
]);
4854
},
4955
);

0 commit comments

Comments
 (0)