Skip to content

Commit 5be2334

Browse files
committed
add component_stack to error
1 parent 2c8dea6 commit 5be2334

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/svelte/src/internal/client/runtime.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ export function handle_error(error, effect, component_context) {
321321
define_property(error, 'message', {
322322
value: error.message + `\n${component_stack.map((name) => `\n${indent}in ${name}`).join('')}\n`
323323
});
324+
define_property(error, 'component_stack', {
325+
value: component_stack
326+
});
324327

325328
const stack = error.stack;
326329

0 commit comments

Comments
 (0)