How do I intercept a NotImplementedException in a WPF application?
I'll occasionally throw a NotImplementedException while testing my in-progress WPF application:
Private Sub ButtonDoSomething_Click(...) Handles ButtonDoSomething.Click
Throw New NotImplementedException( _
"ButtonDoSomething_Click() not implemented.")
End Sub
But, I'd rather these not crash the program.
I could replace all such exception throws with:
MessageBox.Show("ButtonDoSomething_Click() not implemented.", _
"Not Implemented", MessageBoxButton.OK, MessageBoxImage.Information)
But that seems inellegant somehow and wouldn't work if the NotImplementedException was buried away from the interface.
How can I capture all such exceptions and display a message box?