Repository navigation
Conversation
|
Awesome, thanks for your contribution! Can we please leave a comment above the new conditional explaining the instance check (maybe with some links to docs)? We can also update the comments below it that refer to |
|
Echoing @AbhiPrasad, thanks for the contribution! I modified your change slightly, so that we don't miss capturing the |
Inspired by #4156 - h/t @nowylie. According to the spec[1], all `DOMExceptions` should also be `Error`s (and therefore potentially have a stacktrace), though this isn't universally followed. In the cases in which it is, we should be capturing that stack. Fixes #4085 Fixes #3119 [1] https://webidl.spec.whatwg.org/#es-DOMException-specialness
|
@AbhiPrasad @lobsterkatie no worries, thanks for merging a a fix! I look forward to having stack traces on these errors in the future :) |
|
This is released with SDK |
Inspired by #4156 - h/t @nowylie. According to the spec[1], all `DOMExceptions` should also be `Error`s (and therefore potentially have a stacktrace), though this isn't universally followed. In the cases in which it is, we should be capturing that stack. Fixes #4085 Fixes #3119 [1] https://webidl.spec.whatwg.org/#es-DOMException-specialness
As mentioned in #4085,
DOMExceptions are not a legacy API and on current browsers are instances ofError. This change tests whether the exception is an instance ofErrorbefore throwing away all the good bits.Before submitting a pull request, please take a look at our
Contributing guidelines and verify:
yarn lint) & (yarn test).Fixes #4085
Fixes #3119