static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); GenericExceptions.InitializeExceptions(); SingleApplication.Run(new Main()); }
/// <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); }
/// <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); }
public static void UnhandledException(object sender, UnhandledExceptionEventArgs e) { GenericExceptions.LogException((Exception)e.ExceptionObject); }