MCPcopy Index your code
hub / github.com/sveltejs/kit / handle_error

Function handle_error

packages/kit/src/cli.js:9–20  ·  view source on GitHub ↗

@param {unknown} e

(e)

Source from the content-addressed store, hash-verified

7
8/** @param {unknown} e */
9function handle_error(e) {
10 const error = coalesce_to_error(e);
11
12 if (error.name === 'SyntaxError') throw error;
13
14 console.error(colors.bold().red(`> ${error.message}`));
15 if (error.stack) {
16 console.error(colors.gray(error.stack.split('\n').slice(1).join('\n')));
17 }
18
19 process.exit(1);
20}
21
22const pkg = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url), 'utf-8'));
23const prog = sade('svelte-kit').version(pkg.version);

Callers 1

cli.jsFile · 0.70

Calls 2

coalesce_to_errorFunction · 0.90
errorMethod · 0.65

Tested by

no test coverage detected