/[AnywhereTS-MSSQL]/trunk/TSAdminTool/UNCconverter.cs
ViewVC logotype

Diff of /trunk/TSAdminTool/UNCconverter.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/TSAdminTool/UNCconverter.cs	2012/07/11 14:19:13	4
+++ trunk/TSAdminTool/UNCconverter.cs	2012/07/12 18:56:31	64
@@ -45,12 +45,22 @@
               ref buffer, ref size);
             if (retVal != 0)
             {
-              throw new Win32Exception(retVal);
+                Win32Exception ex = new Win32Exception(retVal);
+                using (log4net.NDC.Push(string.Format("Win32Exception: MESSAGE={0}{1}Diagnostics:{1}{2}", ex.Message, System.Environment.NewLine, ex.ToString())))
+                {
+                    Logging.ATSAdminLog.Error(string.Format("Failed to convert LOCAL Path: {0} to a UNC Path", localPath));
+                }
+                return "";
             }
           }
           else
           {
-            throw new Win32Exception(retVal);
+              Win32Exception ex = new Win32Exception(retVal);
+              using (log4net.NDC.Push(string.Format("Win32Exception: MESSAGE={0}{1}Diagnostics:{1}{2}", ex.Message, System.Environment.NewLine, ex.ToString())))
+              {
+                  Logging.ATSAdminLog.Error(string.Format("Failed to convert LOCAL Path: {0} to a UNC Path", localPath));
+              }
+              return "";
           }
           return buffer.ToString();
         }

 

  ViewVC Help
Powered by ViewVC 1.1.22