ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/AnywhereTS-MSSQL/trunk/TSAdminTool/frmAdmin.cs
(Generate patch)

Comparing trunk/TSAdminTool/frmAdmin.cs (file contents):
Revision 60 by william, Thu Jul 12 17:03:02 2012 UTC vs.
Revision 61 by william, Thu Jul 12 17:34:46 2012 UTC

# Line 9 | Line 9 | namespace AnywhereTS
9      using System.Windows.Forms;
10      using System.Runtime.InteropServices;
11      using System.IO;
12 <    using System.Data.SqlClient; // For File operations
12 >    using System.Data.SqlClient;
13 >    using System.Security.Permissions; // For File operations
14      
15  
16      public partial class frmAdmin : Form
# Line 24 | Line 25 | namespace AnywhereTS
25          public frmAdmin()
26          {
27              InitializeComponent();            
28 <        }
28 <
29 <        static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
30 <        {
31 <            Exception ex = (e.ExceptionObject as Exception);
32 <            if (ex == null)
33 <            {
34 <                Logging.ATSAdminLog.Error("Encountered unhandled Exception, but the exception was null");
35 <                return;
36 <            }
37 <            if (ex.GetType() == typeof(SqlException))
38 <            {
39 <                SqlException sql_ex = (ex as SqlException);
40 <                using (log4net.NDC.Push(string.Format("SqlException: ID={0} MESSAGE={1}{2}Diagnostics:{2}{3}", sql_ex.Number.ToString(), sql_ex.Message, System.Environment.NewLine, sql_ex.ToString())))
41 <                {
42 <                    Logging.ATSAdminLog.Error("Encountered unhandled SqlException");
43 <                }
44 <            }
45 <            else
46 <            {
47 <                using (log4net.NDC.Push(string.Format("Exception: MESSAGE={0}{1}Diagnostics:{1}{2}", ex.Message, System.Environment.NewLine, ex.ToString())))
48 <                {
49 <                    Logging.ATSAdminLog.Error("Encountered unhandled Exception");
50 <                }
51 <            }
52 <        }
28 >        }  
29  
30          private void frmAdmin_Load(object sender, EventArgs e)
31          {            
# Line 762 | Line 738 | namespace AnywhereTS
738  
739  
740          // Configure AnywhereTS
741 <        // Run first time starting ATS and can also be invoked from the Tools menu.
741 >        // Run first time starting ATS and can also be invoked from the Tools menu.        
742          private bool ConfigureATS()
743          {
744 <            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
744 >
745              DialogResult result;
746  
747              if (!ProSupport.IsAnAdministrator())

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines