/// <summary>
 /// Shows a new instance of SimpleExceptionViewer with the exception specified
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="toView">To view.</param>
 /// <param name="caption">The caption.</param>
 public static void Show(IWin32Window parent, Exception toView, string caption)
 {
     using (SimpleExceptionViewer viewer = new SimpleExceptionViewer(toView, caption))
     {
         viewer.ShowDialog(parent);
     }
 }
		/// <summary>
		/// Shows a new instance of SimpleExceptionViewer with the exception specified
		/// </summary>
		/// <param name="parent">The parent.</param>
		/// <param name="toView">To view.</param>
		/// <param name="caption">The caption.</param>
		public static void Show(IWin32Window parent, Exception toView, string caption)
		{
			using(SimpleExceptionViewer viewer = new SimpleExceptionViewer(toView, caption))
			{
				viewer.ShowDialog(parent);
			}
		}
Ejemplo n.º 3
0
 /// <summary>
 /// Handles the UnhandledException event of the CurrentDomain control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.UnhandledExceptionEventArgs"/> instance containing the event data.</param>
 private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     SimpleExceptionViewer.Show(null, (Exception)e.ExceptionObject, "An unhandled exception occured.");
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Handles the ThreadException event of the Application control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.Threading.ThreadExceptionEventArgs"/> instance containing the event data.</param>
 private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
 {
     SimpleExceptionViewer.Show(null, e.Exception, "An Unhandled exception occured.");
 }