From 4c1e3c0d76508b4d45d33df9bcbc1dad8d725448 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Wed, 9 Oct 2024 10:48:20 -0700 Subject: [PATCH] chore: add code comment explaining empty catch block (#12780) --- packages/kit/src/exports/vite/dev/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/kit/src/exports/vite/dev/index.js b/packages/kit/src/exports/vite/dev/index.js index 84287237f406..c93bf5e690ee 100644 --- a/packages/kit/src/exports/vite/dev/index.js +++ b/packages/kit/src/exports/vite/dev/index.js @@ -272,7 +272,10 @@ export async function dev(vite, vite_config, svelte_config) { function fix_stack_trace(error) { try { vite.ssrFixStacktrace(error); - } catch {} + } catch { + // ssrFixStacktrace can fail on StackBlitz web containers and we don't know why + // by ignoring it the line numbers are wrong, but at least we can show the error + } return error.stack; }