Skip to content

Commit

Permalink
wrap: only backtrace for runner
Browse files Browse the repository at this point in the history
  • Loading branch information
CanadaHonk committed Jan 31, 2024
1 parent 6dcd723 commit eeb45f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ export default async (source, flags = [ 'module' ], customImports = {}, print =
}
});
} catch (e) {
// only backtrace for runner, not test262/etc
if (!process.argv[1].includes('/runner')) throw e;

const funcInd = parseInt(e.message.match(/function #([0-9]+) /)[1]);
const blobOffset = parseInt(e.message.split('@')[1]);

Expand Down

0 comments on commit eeb45f8

Please sign in to comment.