mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
Log first change exception
This commit is contained in:
@@ -74,7 +74,7 @@ namespace Wox.Core.Plugin
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(e);
|
||||
Log.Exception(e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Wox.Core.Plugin
|
||||
catch (Exception e)
|
||||
{
|
||||
string msg = $"Parse plugin config {configPath} failed: json format is not valid";
|
||||
Log.Error(new WoxException(msg));
|
||||
Log.Exception(new WoxException(msg));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -86,14 +86,14 @@ namespace Wox.Core.Plugin
|
||||
if (!AllowedLanguage.IsAllowed(metadata.Language))
|
||||
{
|
||||
string msg = $"Parse plugin config {configPath} failed: invalid language {metadata.Language}";
|
||||
Log.Error(new WoxException(msg));
|
||||
Log.Exception(new WoxException(msg));
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!File.Exists(metadata.ExecuteFilePath))
|
||||
{
|
||||
string msg = $"Parse plugin config {configPath} failed: ExecuteFile {metadata.ExecuteFilePath} didn't exist";
|
||||
Log.Error(new WoxException(msg));
|
||||
Log.Exception(new WoxException(msg));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ namespace Wox.Core.Plugin
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(new WoxPluginException(metadata.Name, "Couldn't load plugin context menus", e));
|
||||
Log.Exception(new WoxPluginException(metadata.Name, "Couldn't load plugin context menus", e));
|
||||
return new List<Result>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Wox.Core.Plugin
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(new WoxPluginException(metadata.Name, "Couldn't load assembly", e));
|
||||
Log.Exception(new WoxPluginException(metadata.Name, "Couldn't load assembly", e));
|
||||
continue;
|
||||
}
|
||||
var types = assembly.GetTypes();
|
||||
@@ -50,7 +50,7 @@ namespace Wox.Core.Plugin
|
||||
}
|
||||
catch (InvalidOperationException e)
|
||||
{
|
||||
Log.Error(new WoxPluginException(metadata.Name, "Can't find class implement IPlugin", e));
|
||||
Log.Exception(new WoxPluginException(metadata.Name, "Can't find class implement IPlugin", e));
|
||||
continue;
|
||||
}
|
||||
IPlugin plugin;
|
||||
@@ -60,7 +60,7 @@ namespace Wox.Core.Plugin
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(new WoxPluginException(metadata.Name, "Can't create instance", e));
|
||||
Log.Exception(new WoxPluginException(metadata.Name, "Can't create instance", e));
|
||||
continue;
|
||||
}
|
||||
PluginPair pair = new PluginPair
|
||||
@@ -90,13 +90,13 @@ namespace Wox.Core.Plugin
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error(new WoxException("Python can't be found in PATH."));
|
||||
Log.Exception(new WoxException("Python can't be found in PATH."));
|
||||
return new List<PluginPair>();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error(new WoxException("Path variable is not set."));
|
||||
Log.Exception(new WoxException("Path variable is not set."));
|
||||
return new List<PluginPair>();
|
||||
}
|
||||
}
|
||||
@@ -109,7 +109,7 @@ namespace Wox.Core.Plugin
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error(new WoxException("Can't find python executable in python directory"));
|
||||
Log.Exception(new WoxException("Can't find python executable in python directory"));
|
||||
return new List<PluginPair>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Wox.Core.Resource
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(e);
|
||||
Log.Exception(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,7 +117,7 @@ namespace Wox.Core.Resource
|
||||
catch (Exception e)
|
||||
{
|
||||
var woxPluginException = new WoxPluginException(pluginPair.Metadata.Name, "Update Plugin metadata translation failed:", e);
|
||||
Log.Error(woxPluginException);
|
||||
Log.Exception(woxPluginException);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Wox.Core.Resource
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(e);
|
||||
Log.Exception(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,16 +34,16 @@ namespace Wox.Core
|
||||
}
|
||||
catch (HttpRequestException he)
|
||||
{
|
||||
Log.Error(he);
|
||||
Log.Exception(he);
|
||||
}
|
||||
catch (WebException we)
|
||||
{
|
||||
Log.Error(we);
|
||||
Log.Exception(we);
|
||||
}
|
||||
catch (SocketException sc)
|
||||
{
|
||||
Log.Info("Socket exception happened!, which method cause this exception??");
|
||||
Log.Error(sc);
|
||||
Log.Exception(sc);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -72,7 +72,7 @@ namespace Wox.Core
|
||||
catch (WebException e)
|
||||
{
|
||||
Log.Warn("Can't connect to github api to check new version");
|
||||
Log.Error(e);
|
||||
Log.Exception(e);
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Wox.Core
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
Log.Error(e);
|
||||
Log.Exception(e);
|
||||
return string.Empty;
|
||||
}
|
||||
var version = json?["tag_name"]?.ToString();
|
||||
|
||||
Reference in New Issue
Block a user