Unhandled Application Exceptions Sample

This sample demonstrates how to handle DispatcherUnhandledException to process recoverable and unrecoverable unhandled application exceptions. Building the Sample Install the Windows Software Development Kit (SDK) and open its build environment command window.

 
 
 
 
 
(0)
5,882 times
Add to favorites
2/1/2011
E-mail Twitter del.icio.us Digg Facebook
Public Class MainWindow
    Inherits Window

    Public Sub New()
        Me.InitializeComponent()
    End Sub

    Private Sub raiseRecoverableException_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
        Throw New DivideByZeroException("Recoverable Exception")
    End Sub

    Private Sub raiseUnecoverableException_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
        Throw New ArgumentNullException("Unrecoverable Exception")
    End Sub

End Class