Rename ObserveException to Catch - #96
Merged
Merged
Conversation
Copilot created this pull request from a session on behalf of
Tyrrrz
July 26, 2026 19:50
View session
Tyrrrz
marked this pull request as ready for review
July 26, 2026 20:14
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## prime #96 +/- ##
==========================================
+ Coverage 86.24% 86.46% +0.22%
==========================================
Files 78 78
Lines 1410 1411 +1
Branches 243 243
==========================================
+ Hits 1216 1220 +4
+ Misses 140 138 -2
+ Partials 54 53 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Renames the Task extension method ObserveException() to Catch() while preserving backward compatibility via an [Obsolete] forwarding wrapper, and updates tests to target the new API name.
Changes:
- Introduced
Catch()as the primary implementation for observing/suppressing unobserved task exceptions. - Converted
ObserveException()into an[Obsolete("Use Catch() instead.")]one-liner delegate toCatch(). - Updated
TaskExtensionsTeststo useCatch()and renamed test methods accordingly.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| PowerKit/Extensions/TaskExtensions.cs | Adds Catch() implementation and marks ObserveException() obsolete as a redirect. |
| PowerKit.Tests/Extensions/TaskExtensionsTests.cs | Updates tests to call Catch() and renames test methods to match the new API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Tyrrrz
approved these changes
Jul 26, 2026
This was referenced Aug 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renames
TaskExtensions.ObserveException()toCatch(). The old name is retained as an[Obsolete]redirect for backward compatibility.Changes
TaskExtensions.cs:Catch()carries the implementation;ObserveException()becomes a one-liner delegate marked[Obsolete("Use Catch() instead.")]TaskExtensionsTests.cs: Test methods updated to exerciseCatch()Usage