Open sigmaSd opened 1 year ago
Actually this issue is annoying in practice, when I get such errors, I don't know here to look, and I have to add logs everywhere
I wonder if this is just a javascript limitation
At least I found a workaround , set this somewhere at the start $.setPrintCommand(true);
Maybe this should be mentioned in the docs, its useful so far
Probably this is https://github.com/denoland/deno/issues/18946
Here's a small reproduction:
async function a() {
await new Promise((resolve, reject) => {
setTimeout(() => {
reject(new Error("test"));
}, 20);
});
}
try {
await a();
} catch (err) {
console.log(err.stack);
}
Edit: No this is wrong.
Probably Error.captureStackTrace
could be used here to improve the stack trace. I just did something similar in https://github.com/dsherret/dax/pull/236
I'll try to look into it soon.
Don't know if its a dax or a deno issue, or if its the way things works But It would be great if this can be fixed
code:
result
The stack doesn't reach to user code