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 opportunity to force user of function to handle exception #53058

Closed
machinescream opened this issue Jul 27, 2023 · 3 comments
Closed

Add opportunity to force user of function to handle exception #53058

machinescream opened this issue Jul 27, 2023 · 3 comments
Labels
closed-duplicate Closed in favor of an existing report

Comments

@machinescream
Copy link

Something similar to throwable from Java maybe?

@lrhn
Copy link
Member

lrhn commented Jul 27, 2023

I think that's dart-lang/language#984.

@machinescream
Copy link
Author

required onError callback as an alternative, right?

@lrhn
Copy link
Member

lrhn commented Jul 29, 2023

I don't think people manually calling Future.then is going to be the main issue. Most people use await instead. If we never make it work for direct use of futures, just normal functions and awaited async functions, it'll probably be adequate.

And just making it work for synchronous functions is hard enough.

Closing as duplicate, feel free to contribute the discussion on the other issue.

@lrhn lrhn added the closed-duplicate Closed in favor of an existing report label Jul 29, 2023
@lrhn lrhn closed this as completed Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

2 participants