UnhandledExceptionEventArgs
UnhandledExceptionEventArgs
UnhandledExceptionEventArgs
UnhandledExceptionEventArgs
Class
Definition
Provides data for the UnhandledException event.
public : sealed class UnhandledExceptionEventArgs : IUnhandledExceptionEventArgspublic sealed class UnhandledExceptionEventArgs : IUnhandledExceptionEventArgsPublic NotInheritable Class UnhandledExceptionEventArgs Implements IUnhandledExceptionEventArgs// This API is not available in Javascript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
For more info on how to write a handler based on the UnhandledExceptionEventHandler delegate, see Exception handling for in C# or Visual Basic and Remarks in UnhandledException.
If you're using Visual C++ component extensions (C++/CX), see Exceptions (C++/CX).
Properties
Exception Exception Exception Exception
Gets the HRESULT code associated with the unhandled exception.
public : HResult Exception { get; }public Exception Exception { get; }Public ReadOnly Property Exception As Exception// This API is not available in Javascript.
- Value
- HResult Exception Exception Exception
The HRESULT code (for Visual C++ component extensions (C++/CX)), or a mapped common language runtime (CLR) System.Exception.
- See Also
Handled Handled Handled Handled
Gets or sets a value that indicates whether the exception is handled.
public : PlatForm::Boolean Handled { get; set; }public bool Handled { get; set; }Public ReadWrite Property Handled As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
true to mark the exception as handled, which indicates that the event system should not process it further; otherwise, false.
Remarks
Do not routinely set this value to true, that is not always safe and may not guarantee that the app wouldn't terminate anyways. For more info, see Exception handling for in C# or Visual Basic and Remarks in UnhandledException.
- See Also
Message Message Message Message
Gets the message string as passed by the originating unhandled exception.
public : PlatForm::String Message { get; }public string Message { get; }Public ReadOnly Property Message As string// This API is not available in Javascript.
- Value
- PlatForm::String string string string
The message string, which may be useful for debugging.
Remarks
The message is coming from info that's propagated by the original system or runtime app error. The message is not guaranteed to be an exact match to the original error message (as seen in native stacks or output windows). For more info on error propagation and exception handling techniques, see Exception handling for in C# or Visual Basic and Remarks in UnhandledException.
- See Also