- Notifications
You must be signed in to change notification settings - Fork1.1k
Throw errors, not strings#514
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This would be a good thing in theory, but it would require a major version bump. Maybe we can include that when we need to break backwards compatibility anyway |
Makes sense. Would it be possible to make a prerelease of some sort which includes this? Or is it too far in time? |
Another suggestion: Something like constinitSqlJs=require('sql.js');initSqlJs.throwAsErrors=true; |
sunnykgupta commentedOct 4, 2024
Definitely a good way to incorporate the behaviour keeping it optional and eventually making it the default whenever a major bump is planned. |
Throwing strings makes it difficult to debug for specific issues when working on projects that use sql.js.
Replaced string with Errors when being thrown. (Really just using a constructor around the string).