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

Added error handling. #1607

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

Added error handling. #1607

wants to merge 5 commits into from

Conversation

MGGSK
Copy link
Contributor

@MGGSK MGGSK commented Aug 15, 2024

When an unhandled exception gets thrown the app no longer crashes. Now the user gets a notification with the exception.

Description

  1. Added a event handler to App.UnhandledException.
  2. Written code to create and show the notification.

Motivation and Context

The app crashes a lot.

How Has This Been Tested?

While testing I added a button that throws an exception to test my code.

Screenshots:

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@@ -24,6 +24,7 @@
using System.Text;
using Windows.System;
using System.Runtime.InteropServices;
using Microsoft.Toolkit.Uwp.Notifications;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be able to use the WinAppSDK Notifications instead from the Community Toolkit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it.

@MGGSK MGGSK requested a review from karkarl August 15, 2024 19:54
@MGGSK MGGSK marked this pull request as ready for review August 15, 2024 20:31
@karkarl
Copy link
Collaborator

karkarl commented Sep 27, 2024

/azp run

@@ -83,6 +83,30 @@
<AppxBundle>Never</AppxBundle>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Unpackaged|x86'" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are changes here intentional? If so, what is it for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are changes here intentional? If so, what is it for?

Fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants