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

Rethrow errors in the upgrade handler #9

Closed
wants to merge 1 commit into from

Conversation

anlumo
Copy link
Contributor

@anlumo anlumo commented Apr 6, 2022

Currently, when there's something wrong with the configuration (like a compound primary key with autoincrement enabled, or invalid characters in the primary key), there's no error output other than unwrap_throw. With this change, the underlying error is propagated up, so it actually shows up in the web inspector console.

I've needed that quite a few times during development, so I figure it might be a good idea to include that for everybody.

Copy link
Owner

@devashishdxt devashishdxt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this even when using console_error_panic_hook?

@anlumo
Copy link
Contributor Author

anlumo commented Apr 6, 2022

unwrap_throw doesn't panic, it throws a JS exception. So, console_error_panic_hook shouldn't be triggered.

@devashishdxt
Copy link
Owner

Closing this PR in favor of #10, which removes all the unwrap_throw()s in code.

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

Successfully merging this pull request may close these issues.

2 participants