Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
and3k5 wants to merge2 commits intosql-js:master
base:master
Choose a base branch
Loading
fromand3k5:throw-errors

Conversation

and3k5
Copy link

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).

@lovasoa
Copy link
Member

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

and3k5 and stefnotch reacted with thumbs up emoji

@and3k5
Copy link
Author

Makes sense.

Would it be possible to make a prerelease of some sort which includes this? Or is it too far in time?

@and3k5
Copy link
Author

Another suggestion:
Can me make a change where we make a global switch to change how errors are thrown?

Something like

constinitSqlJs=require('sql.js');initSqlJs.throwAsErrors=true;
sunnykgupta reacted with rocket emoji

@sunnykgupta
Copy link

Definitely a good way to incorporate the behaviour keeping it optional and eventually making it the default whenever a major bump is planned.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@and3k5@lovasoa@sunnykgupta

[8]ページ先頭

©2009-2025 Movatter.jp