Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getError(error, source) {
return `
const e = Error(\`<pre>${codeframe({
error,
source,
highlightCode: false,
})}</pre>\`);
e.code = 'frame';
throw e;
`;
}