Improve logging for PT Run (#6800)

* init code pass

* adjusting tabbing for readabilty

* few small adjustments
This commit is contained in:
Clint Rutkas
2020-09-23 16:32:06 -07:00
committed by GitHub
parent dafc1e0c7d
commit b071220b6c
35 changed files with 186 additions and 289 deletions

View File

@@ -54,7 +54,7 @@ namespace Microsoft.Plugin.Folder
catch (Exception e)
{
var message = Properties.Resources.Microsoft_plugin_folder_clipboard_failed;
LogException(message, e);
Log.Exception(message, e, GetType());
_context.API.ShowMsg(message);
return false;
}
@@ -87,7 +87,8 @@ namespace Microsoft.Plugin.Folder
}
catch (Exception e)
{
Log.Exception($"|Microsoft.Plugin.Folder.ContextMenuLoader.LoadContextMenus| Failed to open {record.FullPath} in console, {e.Message}", e);
Log.Exception($"Failed to open {record.FullPath} in console, {e.Message}", e, GetType());
return false;
}
},
@@ -117,8 +118,9 @@ namespace Microsoft.Plugin.Folder
catch (Exception e)
{
var message = $"{Properties.Resources.Microsoft_plugin_folder_file_open_failed} {record.FullPath}";
LogException(message, e);
Log.Exception(message, e, GetType());
_context.API.ShowMsg(message);
return false;
}
@@ -126,11 +128,6 @@ namespace Microsoft.Plugin.Folder
},
};
}
public static void LogException(string message, Exception e)
{
Log.Exception($"|Microsoft.Plugin.Folder.ContextMenu|{message}", e);
}
}
public enum ResultType