<commit_before>﻿using ReClassNET.Forms;
using System;
using System.Globalization;
using System.Windows.Forms;
using ReClassNET.Util;
using ReClassNET.UI;

namespace ReClassNET
{
	static class Program
	{
		private static Settings settings;
		private static Random random = new Random();
		private static bool designMode = true;

		public static Settings Settings => settings;

		public static Random GlobalRandom => random;

		public static bool DesignMode => designMode;

		[STAThread]
		static void Main()
		{
			designMode = false; // The designer doesn't call Main()

			DpiUtil.ConfigureProcess();

			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);

#if RELEASE
			try
			{
#endif
				CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;

				settings = Settings.Load(Constants.SettingsFile);

				using (var nativeHelper = new NativeHelper())
				{
					var form = new MainForm(nativeHelper, settings);

					Application.Run(form);
				}

				Settings.Save(settings, Constants.SettingsFile);
#if RELEASE
			}
			catch (Exception ex)
			{
				ex.ShowDialog();
			}
#endif
		}
	}
}<commit_msg>Changed the try-catch block.<commit_after>﻿using System;
using System.Globalization;
using System.Windows.Forms;
using ReClassNET.Forms;
using ReClassNET.UI;
using ReClassNET.Util;

namespace ReClassNET
{
	static class Program
	{
		private static Settings settings;
		private static Random random = new Random();
		private static bool designMode = true;

		public static Settings Settings => settings;

		public static Random GlobalRandom => random;

		public static bool DesignMode => designMode;

		[STAThread]
		static void Main()
		{
			designMode = false; // The designer doesn't call Main()

			DpiUtil.ConfigureProcess();

			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);

			CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;

			settings = Settings.Load(Constants.SettingsFile);

#if RELEASE
			try
			{
				using (var nativeHelper = new NativeHelper())
				{
					var form = new MainForm(nativeHelper, settings);

					Application.Run(form);
				}
			}
			catch (Exception ex)
			{
				ex.ShowDialog();
			}
#else
			using (var nativeHelper = new NativeHelper())
			{
				var form = new MainForm(nativeHelper, settings);

				Application.Run(form);
			}
#endif

			Settings.Save(settings, Constants.SettingsFile);
		}
	}
}
{'fraction_non_alphanumeric': 0.09401709401709402, 'fraction_numerical': 0.0, 'mean_word_length': 3.906187624750499, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3971225', 'n_tokens_mistral': 839, 'n_tokens_neox': 689, 'n_words': 190}