Skip to content
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

Uncaught error when reading a Proxy object #186

Open
Fil opened this issue Aug 8, 2023 · 0 comments
Open

Uncaught error when reading a Proxy object #186

Fil opened this issue Aug 8, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Fil
Copy link

Fil commented Aug 8, 2023

The following code will log an error in the console, and the inspector will not return.

new Proxy({}, {ownKeys: function () { throw new Error("gotcha"); }})

I'd expect the inspector to catch the error and surface it (in red).

This error happens for real when using the HISTOGRAM() function in DuckDB, which returns a Proxy that doesn’t let us enumerate its keys via for…in at

for (const key in array) {
(The Proxy object from Apache Arrow throws “TypeError: 0 is not a valid property name”.)

(with thanks to @mootari)

@Fil Fil added the bug Something isn't working label Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant