mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 19:49:15 +08:00
Merge pull request #69 from jjw24/fix_error_message
Fix error message logging for prod run
This commit is contained in:
commit
6a664d976f
@ -41,7 +41,8 @@ namespace Wox.Plugin.Program.Logger
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Please follow exception format: |class name|calling method name|loading program path|user friendly message that explains the error
|
/// Please follow exception format, there are four parts to an error message that need to be specified:
|
||||||
|
/// |class name|calling method name|loading program path|user friendly message that explains the error
|
||||||
/// => Example: |Win32|LnkProgram|c:\..\chrome.exe|Permission denied on directory, but Wox should continue
|
/// => Example: |Win32|LnkProgram|c:\..\chrome.exe|Permission denied on directory, but Wox should continue
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||||
|
@ -159,15 +159,15 @@ namespace Wox.Plugin.Program.Programs
|
|||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
ProgramLogger.LogException("|UWP|All|An unexpected error occured and "
|
ProgramLogger.LogException($"|UWP|All|{p.InstalledLocation}|An unexpected error occured and "
|
||||||
+ $"unable to convert Package to UWP for {p.Id.FullName}", e);
|
+ $"unable to convert Package to UWP for {p.Id.FullName}", e);
|
||||||
return new Application[] { };
|
return new Application[] { };
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if DEBUG //make developer aware and implement handling
|
#if DEBUG //make developer aware and implement handling
|
||||||
catch(Exception)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
throw;
|
throw e;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return u.Apps;
|
return u.Apps;
|
||||||
@ -207,7 +207,7 @@ namespace Wox.Plugin.Program.Programs
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
ProgramLogger.LogException("|UWP|CurrentUserPackages|An unexpected error occured and "
|
ProgramLogger.LogException("|UWP|CurrentUserPackages|Not available|An unexpected error occured and "
|
||||||
+ $"unable to verify if package is valid", e);
|
+ $"unable to verify if package is valid", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user