Reputation: 883
Is there any smart way to detect when an application has crashed? I want to use this information to be able to send a crash report to our servers.
The only thing I've found is checking:
LaunchActivatedEventArgs args.PreviousExecutionState ==
ApplicationExecutionState.Terminated
When the application is started next time, however can I be sure that the applicatoin crashed just because it has "Terminated" execution state? How else can I check this?
Upvotes: 1
Views: 148
Reputation: 1141
You can use AppDomain.UnhandledException or Application.UnhandledException events.
Upvotes: 1