-
Notifications
You must be signed in to change notification settings - Fork 48.4k
[devtools] Allow inspecting cause, name, message, stack of Errors in props #33023
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
isPathAllowedCheck ? 1 : level + 1, | ||
); | ||
|
||
if ('cause' in data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be false
if no cause
was actually included ('cause' in new Error('test')
) but true
if it was (even if undefined) ('cause' in new Error('test', { cause: undefined })
)
24ba9b6
to
0c74a7d
Compare
0c74a7d
to
4a61714
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome!
Could you also try right-clicking on the Error value and selecting "Store as global variable"
? I wonder if it will be printed out in a console with a symbolicated stack right away, that would be nice.
That worked before already. "Copy to clipboard" is still just an empty object though. |
4a61714
to
551ce37
Compare
551ce37
to
3e010ac
Compare
…props (facebook#33023) DiffTrain build for [c498bfc](facebook@c498bfc)
…props (facebook#33023) DiffTrain build for [c498bfc](facebook@c498bfc)
Summary
These are not enumerable properties (which is why we ommitted those previously) yet they're still interesting. I feel like for Errors special casing is warranted.
After:

Before:

How did you test this change?