diff SilverlightGlimpse/SilverlightValidation/Views/UserView.xaml.cs @ 78:dd6bcd2535b6

Working version
author Steven Hollidge <stevenhollidge@hotmail.com>
date Mon, 23 Apr 2012 22:43:53 +0100
parents 86ed4919b126
children 5172a9b9800c
line wrap: on
line diff
--- a/SilverlightGlimpse/SilverlightValidation/Views/UserView.xaml.cs	Mon Apr 23 22:06:05 2012 +0100
+++ b/SilverlightGlimpse/SilverlightValidation/Views/UserView.xaml.cs	Mon Apr 23 22:43:53 2012 +0100
@@ -19,6 +19,9 @@
 
             vm = new UserViewModel(UserModel.Create(), new UserModelValidator());
             this.DataContext = vm;
+
+            // uncomment this exception to view exception on startup 
+            //ThrowNestedException();
         }
 
         private void DatePicker_KeyDown(object sender, KeyEventArgs e)
@@ -29,7 +32,13 @@
 
         private void btnThrowException_OnClick(object sender, RoutedEventArgs e)
         {
-            throw new Exception("Exception from Child Window");
+            ThrowNestedException();
+        }
+
+        private void ThrowNestedException()
+        {
+            throw new Exception("Oh dear we've hit an exception!",
+                                new Exception("This is an inner exception"));
         }
     }
 }
\ No newline at end of file