-In Windows 8.1 you can subscribe to the [Windows::ApplicationModel::Core::CoreApplication::UnhandledErrorDetected](/uwp/api/windows.applicationmodel.core.icoreapplicationunhandlederror#Windows_ApplicationModel_Core_ICoreApplicationUnhandledError_UnhandledErrorDetected) static event, which provides access to unhandled errors that are about to bring down the process. Regardless of where the error originated, it reaches this handler as a [Windows::ApplicationModel::Core::UnhandledError](/uwp/api/windows.applicationmodel.core.unhandlederror) object that's passed in with the event args. When you call `Propagate` on the object, it creates and throws a `Platform::*Exception` of the type that corresponds to the error code. In the catch blocks, you can save user state if necessary and then either allow the process to terminate by calling `throw`, or do something to get the program back into a known state. The following example shows the basic pattern:
0 commit comments