mirror of
https://github.com/denoland/deno.git
synced 2024-10-30 09:08:00 -04:00
806671af33
Fixes #6259. Adds the location for v8 syntax errors to the message (`message += " at {location}"`) when rethrowing them for dynamic imports. Discussing with @bartlomieju on discord I proposed just preserving v8's error and not reconstructing it, allowing the standard stack trace to just point to the syntax error instead of the dynamic import. But on further thought this way has parity with SWC's syntax errors + has the advantage of showing both the syntax error and dynamic import location. ```ts // temp.js await import("./temp2.js"); // temp2.js function foo() { await Promise.resolve(); } // Before: // error: Uncaught (in promise) SyntaxError: Unexpected reserved word // await import("./temp2.js"); // ^ // at async file:///.../temp.js:1:1 // After: // error: Uncaught (in promise) SyntaxError: Unexpected reserved word at file:///.../temp2.js:2:3 // await import("./temp2.js"); // ^ // at async file:///.../temp.js:1:1 ``` |
||
---|---|---|
.. | ||
integration | ||
node_compat | ||
testdata | ||
unit | ||
unit_node | ||
integration_tests.rs |