[PR #3091] [MERGED] [PM-7009] Improved exception messages for the Broadcast Service message callback function #122609

Closed
opened 2026-06-12 00:23:53 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/3091
Author: @dinisvieira
Created: 3/17/2024
Status: ✅ Merged
Merged: 3/22/2024
Merged by: @fedemkr

Base: main ← Head: feature/improved-exception-messages-app-callback


📝 Commits (10+)

  • 430ea65 Improved exception messages for the Broadcast Service message callback function
  • e644aeb Update src/Core/App.xaml.cs
  • 3c7b3ac Update src/Core/App.xaml.cs
  • 24a6756 Update src/Core/App.xaml.cs
  • a5ee2c7 Update src/Core/App.xaml.cs
  • d2564d1 Update src/Core/App.xaml.cs
  • 6da7649 Update src/Core/App.xaml.cs
  • a5f4c2b Update src/Core/App.xaml.cs
  • d552afa Merge branch 'main' into feature/improved-exception-messages-app-callback
  • 732bbb2 Merge branch 'main' into feature/improved-exception-messages-app-callback

📊 Changes

1 file changed (+125 additions, -104 deletions)

View changed files

📝 src/Core/App.xaml.cs (+125 -104)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

When exceptions occur inside the lambda for the BroadcastService Callback in App.xaml.cs they can be difficult to read or incomplete.
The idea is to try to make them a bit more clear when looking at AppCenter diagnostics.

Code changes

One potential way to improve them was to change the callback to be a named method instead off a lambda.
Also all the MainThread Invoke inside this callback were changed to have local functions instead of lambdas.

As an example a stacktrace that looked like this:
at Bit.App.App.<>c__DisplayClass28_0.<<-ctor>b__2>d.MoveNext(
Now looks like this:
at Bit.App.App.<>c__DisplayClass29_0.<<BroadcastServiceMessageCallbackAsync>g__ExecuteNavigationAction|0>d.MoveNext(

  • App.xaml.cs:

Screenshots

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/3091 **Author:** [@dinisvieira](https://github.com/dinisvieira) **Created:** 3/17/2024 **Status:** ✅ Merged **Merged:** 3/22/2024 **Merged by:** [@fedemkr](https://github.com/fedemkr) **Base:** `main` ← **Head:** `feature/improved-exception-messages-app-callback` --- ### 📝 Commits (10+) - [`430ea65`](https://github.com/bitwarden/android/commit/430ea6550e133f1b98b4ecb077a1067798c146e1) Improved exception messages for the Broadcast Service message callback function - [`e644aeb`](https://github.com/bitwarden/android/commit/e644aeb8f10587cfcd2cb3ec1b52369d5cfafd62) Update src/Core/App.xaml.cs - [`3c7b3ac`](https://github.com/bitwarden/android/commit/3c7b3ac08b2e634bc71ec6e3f01697555ddd7e7c) Update src/Core/App.xaml.cs - [`24a6756`](https://github.com/bitwarden/android/commit/24a675627f1642c812239555604f471d7293eea8) Update src/Core/App.xaml.cs - [`a5ee2c7`](https://github.com/bitwarden/android/commit/a5ee2c7c1fea2dfbf33a54434d5ae8250b4745d6) Update src/Core/App.xaml.cs - [`d2564d1`](https://github.com/bitwarden/android/commit/d2564d1fe0c0271007b1fa18463c105b8149d1de) Update src/Core/App.xaml.cs - [`6da7649`](https://github.com/bitwarden/android/commit/6da7649a59b859f3254d5c8a4d3c75053faac384) Update src/Core/App.xaml.cs - [`a5f4c2b`](https://github.com/bitwarden/android/commit/a5f4c2b70830c7dee33a5d8f9a5ef317bd0189fa) Update src/Core/App.xaml.cs - [`d552afa`](https://github.com/bitwarden/android/commit/d552afa40937de29e0192a6eb611bbac1059f9f1) Merge branch 'main' into feature/improved-exception-messages-app-callback - [`732bbb2`](https://github.com/bitwarden/android/commit/732bbb2ad74c84b112294db8725f55a96791ec2d) Merge branch 'main' into feature/improved-exception-messages-app-callback ### 📊 Changes **1 file changed** (+125 additions, -104 deletions) <details> <summary>View changed files</summary> 📝 `src/Core/App.xaml.cs` (+125 -104) </details> ### 📄 Description ## Type of change - [ ] Bug fix - [ ] New feature development - [x] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective When exceptions occur inside the lambda for the BroadcastService Callback in `App.xaml.cs` they can be difficult to read or incomplete. The idea is to try to make them a bit more clear when looking at AppCenter diagnostics. ## Code changes One potential way to improve them was to change the callback to be a named method instead off a lambda. Also all the `MainThread` Invoke inside this callback were changed to have local functions instead of lambdas. As an example a stacktrace that looked like this: `at Bit.App.App.<>c__DisplayClass28_0.<<-ctor>b__2>d.MoveNext(` Now looks like this: `at Bit.App.App.<>c__DisplayClass29_0.<<BroadcastServiceMessageCallbackAsync>g__ExecuteNavigationAction|0>d.MoveNext(` * **App.xaml.cs:** ## Screenshots <!--Required for any UI changes. Delete if not applicable--> ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-12 00:23:53 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#122609