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 rather than resolving them#87

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

Merged
keithamus merged 1 commit intomainfromthrow-errors-rather-than-resolving-them
Dec 1, 2022

Conversation

keithamus
Copy link
Contributor

@lgarron a slight change in the API to be more idiomatic (and also backwards compatible).

Instead of returning Error objects, we throw them so the Promise rejects.

lgarron reacted with thumbs up emoji
@keithamuskeithamus requested a review froma team as acode ownerDecember 1, 2022 09:42
@keithamuskeithamus merged commit5dfb899 intomainDec 1, 2022
@keithamuskeithamus deleted the throw-errors-rather-than-resolving-them branchDecember 1, 2022 09:47
@lgarron
Copy link
Contributor

lgarron commentedDec 2, 2022
edited
Loading

Ah, it looks like I misunderstood what

privateData.set(this,{src, data})
was trying to do. I certainly agree that throwing is more idiomatic than returning.

Thanks for the fix!

Comment on lines 199 to 201
if (data instanceof Error) {
return data
throw data
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This might now be unreachable and safe to remove?

lgarron added a commit that referenced this pull requestDec 2, 2022
lgarron added a commit that referenced this pull requestDec 2, 2022
lgarron added a commit that referenced this pull requestDec 2, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@lgarronlgarronlgarron left review comments

@koddssonkoddssonkoddsson approved these changes

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
@keithamus@lgarron@koddsson

[8]ページ先頭

©2009-2025 Movatter.jp