Ejemplo n.º 1
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     GenericExceptions.InitializeExceptions();
     SingleApplication.Run(new Main());
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Logs the specified exception to the specified log file and provides the option to notify the user of the exception.
 /// </summary>
 /// <param name="ex">The exception that has occurred.</param>
 public static void LogException(Exception ex)
 {
     GenericExceptions.LogException(ex, Application.StartupPath + "\\" + Application.ProductName + ".err", false);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Logs the specified exception to the specified log file and provides the option to notify the user of the exception.
 /// </summary>
 /// <param name="ex">The exception that has occurred.</param>
 /// <param name="filename">The file that the exception information should be written to.</param>
 public static void LogException(Exception ex, string filename)
 {
     GenericExceptions.LogException(ex, filename, false);
 }
Ejemplo n.º 4
0
 public static void UnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     GenericExceptions.LogException((Exception)e.ExceptionObject);
 }