Skip to content

Type error when throwing an error from a web worker #294

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

Closed
AnyhowStep opened this issue Sep 16, 2019 · 2 comments
Closed

Type error when throwing an error from a web worker #294

AnyhowStep opened this issue Sep 16, 2019 · 2 comments

Comments

@AnyhowStep
Copy link

AnyhowStep commented Sep 16, 2019

https://github.com/kripken/sql.js/blob/4e91be7da52cdcf26fabb10fcc6f922d3a823cb2/dist/worker.sql-wasm.js#L272

This err is assigned to but never read.

https://github.com/kripken/sql.js/blob/4e91be7da52cdcf26fabb10fcc6f922d3a823cb2/dist/worker.sql-wasm.js#L279

This is essentially,

throw new "hello" + "world";

Which gives,

Uncaught TypeError: "hello" is not a constructor
@lovasoa
Copy link
Member

lovasoa commented Sep 16, 2019

Good catch, thank you. The error comes from here : https://github.com/kripken/sql.js/blob/4e91be7da52cdcf26fabb10fcc6f922d3a823cb2/src/worker.coffee#L51

You can open a PR !

@bryangingechen
Copy link
Contributor

This is addressed by #288.

@lovasoa lovasoa closed this as completed Jan 12, 2020
@lovasoa lovasoa changed the title Suspicious code Type error when throwing an error from a web worker Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants