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

[PAGE ISSUE]: 'Asynchronous programming: futures, async, await' #5669

Closed
1 task
domesticmouse opened this issue Mar 27, 2024 · 1 comment
Closed
1 task
Assignees
Labels
cl.duplicate Closes issue as duplicate of another issue

Comments

@domesticmouse
Copy link
Member

Page URL

https://dart.dev/codelabs/async-await#example-async-and-await-with-try-catch

Page source

https://github.com/dart-lang/site-www/tree/main/src/content/codelabs/async-await.md

Describe the problem

The example code supplied for demonstrating how to handle errors in asynchronous code is not right. The lead in states:

Run the following example to see how to handle an error from an asynchronous function. What do you think the output will be?

But the sample code is:

void main() {
  for (int i = 0; i < 10; i++) {
    print('hello ${i + 1}');
  }
}

Which has zero errors and zero asynchronous functions.

Expected fix

Sample code that demonstrates the issue being discussed in the code. In fact, this sample seems to be boilerplate as it is repeated multiple times on the page.

Additional context

No response

I would like to fix this problem.

  • I will try and fix this problem on dart.dev.
@parlough
Copy link
Member

Yeah. The injection script has an issue with sending events at the wrong time. I'm investigating now - dart-lang/dart-pad#2893

@parlough parlough closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2024
@parlough parlough self-assigned this Mar 27, 2024
@parlough parlough added the cl.duplicate Closes issue as duplicate of another issue label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cl.duplicate Closes issue as duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants