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

refactor(tauri) update error handling crate to anyhow+thiserror, close #613 #621

Merged
merged 5 commits into from
May 29, 2020

Conversation

wusyong
Copy link
Member

@wusyong wusyong commented May 27, 2020

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • New Binding Issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes. Issue #___
  • No

The PR fulfills these requirements:

  • It's submitted to the dev branch and not the master branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:
In this PR, it replaces all functions from error-chain to a more modern error handling crate: anyhow. Most return calls can be even reduced to ? operand in this way. If there's a custom error needed, it uses thiserror to define a new error enum.
Close #613

@wusyong wusyong requested a review from a team as a code owner May 27, 2020 06:39
@wusyong wusyong requested review from a team May 27, 2020 06:39
Copy link
Member

@nothingismagick nothingismagick left a comment

Choose a reason for hiding this comment

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

great work - and cheers for the cleanup here and there too!

@wusyong wusyong force-pushed the anyhow branch 2 times, most recently from 6431fed to 3b45785 Compare May 28, 2020 10:01
@wusyong
Copy link
Member Author

wusyong commented May 28, 2020

Hey, sorry about several rebases out there. I tried to make it pass the CI. I'm not sure why it can't pass the job of Gatsby Themed Site on Windows, while it's working on my fork. Perhaps it's because of cache?

@jbolda
Copy link
Member

jbolda commented May 28, 2020

I'm fine ignoring that error. Gatsby has been a bit flaky with releases past few weeks. That is a Gatsby error, not a Tauri one.

@tensor-programming
Copy link
Member

tensor-programming commented May 29, 2020

Great work. Looks good from where I am; like that we've remove all of the bail! calls too.

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.

Update Error handling crate to thiserror
4 participants