mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Improve logging for PT Run (#6800)
* init code pass * adjusting tabbing for readabilty * few small adjustments
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user