You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var pe = new (require("pretty-error"));
try {
eval(`(function fn(){
throw new Error('some error');
})()`)
} catch(e) {
console.log(e.stack);
console.log(pe.render(e));
}
result:
Error: some error
at fn (eval at <anonymous> (S:\_TEST_\index.js:4:2), <anonymous>:2:9)
at eval (eval at <anonymous> (S:\_TEST_\index.js:4:2), <anonymous>:3:4)
at Object.<anonymous> (S:\_TEST_\index.js:4:2)
at Module._compile (module.js:570:32)
Error: some error
- index.js:4 Object.<anonymous>
S:/_TEST_/index.js:4:2
- module.js:570 Module._compile
module.js:570:32
The text was updated successfully, but these errors were encountered:
example code:
result:
The text was updated successfully, but these errors were encountered: