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

Add catchAsync for Either #105

Open
otto-dev opened this issue Apr 15, 2022 · 0 comments · May be fixed by #106
Open

Add catchAsync for Either #105

otto-dev opened this issue Apr 15, 2022 · 0 comments · May be fixed by #106

Comments

@otto-dev
Copy link

otto-dev commented Apr 15, 2022

Like catching, but for async function bodies.

Usage:

  Future<Either<dynamic, FooBar>> doAsyncThings() {
    return catchAsync(() async {
      final foo = await asyncAction();
      final bar = await asyncAction();
      return foo + bar;
    });
  }
@otto-dev otto-dev linked a pull request Apr 15, 2022 that will close this issue
@otto-dev otto-dev changed the title Add catchingAsync for Either Add catchAsync for Either Apr 16, 2022
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 a pull request may close this issue.

1 participant