コード例 #1
0
        private static void UnhandledException(Exception ex)
        {
            UnhandledException el = new UnhandledException(ex, startupTime);

            System.Threading.Thread t = new System.Threading.Thread(el.DoLog);
            t.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
            t.Start();
            string errorFormat;
            string errorText;

            try
            {
                errorFormat = "There was an unhandled error, and transmission-remote-dotnet must be closed. Refer to the file '{0}', which has been placed on your desktop, for more information.";
                // <comment>{0} is a filename</comment>
            }

            catch (Exception)
            {
                errorFormat = "There was an unhandled error, and transmission-remote-dotnet must be closed. Refer to the file '{0}', which has been placed on your desktop, for more information.";
            }

            errorText = string.Format(errorFormat, el.FileName);
            MessageBox.Show(errorText, "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }
コード例 #2
0
        private static void UnhandledException(Exception ex)
        {
            UnhandledException el = new UnhandledException(ex, startupTime);
            Thread t = new Thread(el.DoLog);
            t.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
            t.Start();
            string errorFormat;
            string errorText;

            try
            {
                errorFormat = "There was an unhandled error, and transmission-remote-dotnet must be closed. Refer to the file '{0}', which has been placed on your desktop, for more information.";
                // <comment>{0} is a filename</comment>
            }
            catch (Exception)
            {
                errorFormat = "There was an unhandled error, and transmission-remote-dotnet must be closed. Refer to the file '{0}', which has been placed on your desktop, for more information.";
            }

            errorText = string.Format(errorFormat, el.FileName);
            MessageBox.Show(errorText, "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }