Skip to content

Add missing TimeoutException to WaitAsync(TimeSpan, TimeProvider, CancellationToken) documentation #11481

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 19, 2025

The Task.WaitAsync(TimeSpan, TimeProvider, CancellationToken) method documentation had an inconsistency where the parameter description for timeout mentioned that a TimeoutException would be thrown when the timeout expires, but this exception was not listed in the method's exceptions section.

Before:
The exceptions section only listed:

  • ArgumentNullException
  • OperationCanceledException

After:
Added the missing TimeoutException with the description: "The timeout expired. This exception is stored into the returned task."

This change ensures consistency between the parameter documentation and the exceptions section, making it clear to developers that they need to handle TimeoutException when using this method.

The fix follows the same pattern used for other timeout-related exceptions in the codebase and maintains consistency with similar WaitAsync method overloads.

Fixes #11190.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

…cellationToken) documentation

Co-authored-by: jeffhandley <[email protected]>
@Copilot Copilot AI changed the title [WIP] Task.WaitAsync(TimeSpan, TimeProvider, CancellationToken) does not list TimeoutException as a possible exception Add missing TimeoutException to WaitAsync(TimeSpan, TimeProvider, CancellationToken) documentation Jun 19, 2025
@Copilot Copilot AI requested a review from jeffhandley June 19, 2025 07:07
Copilot finished work on behalf of jeffhandley June 19, 2025 07:07
@jeffhandley jeffhandley marked this pull request as ready for review June 20, 2025 01:50
@jeffhandley jeffhandley reopened this Jun 20, 2025
@jeffhandley jeffhandley reopened this Jun 20, 2025
@jeffhandley jeffhandley requested a review from a team June 21, 2025 03:18
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.

Task.WaitAsync(TimeSpan, TimeProvider, CancellationToken) does not list TimeoutException as a possible exception
2 participants