Open
Bug 1906150
Opened 1 year ago
Updated 8 months ago
Improve Error messaging & stack traces for SuppressedErrors
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
NEW
People
(Reporter: debadree333, Unassigned)
References
(Blocks 1 open bug)
Details
No description provided.
Updated•1 year ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Updated•1 year ago
|
Summary: Improve Error messaging for SuppressedErrors → Improve Error messaging & stack traces for SuppressedErrors
Updated•1 year ago
|
Severity: -- → N/A
Priority: -- → P3
Reporter | ||
Comment 1•9 months ago
•
|
||
The general consensus regarding this is this should either point to the closing brace of the scope / copy the trace of .error ref [1] but presently our implementation captures the position of the first suppressed error example
{
using x = {
[Symbol.dispose]() {
console.log('disposed 1');
throw 1;
}
}
using y = {
[Symbol.dispose]() {
console.log('disposed 2');
throw 2;
}
}
}
results in:
0:00.53 js test.js
disposed 2
disposed 1
test.js:9:5 SuppressedError: An error is suppressed because another error happened while disposing an object
Stack:
@test.js:9:5
so this can be improved it would essentially involving tweaking the try finally blocks that surround the disposals
[1] https://github.com/tc39/proposal-explicit-resource-management/issues/235
Reporter | ||
Updated•9 months ago
|
Type: task → enhancement
Reporter | ||
Updated•8 months ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•