mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
[PTRun]Fix .NET 9 crash in OneNote (#36417)
* Fix crash in OneNote Run * added better comment
This commit is contained in:
@@ -238,7 +238,10 @@ namespace PowerLauncher.Plugin
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Log.Exception($"Exception for plugin <{pair.Metadata.Name}> when query <{query}>", e, MethodBase.GetCurrentMethod().DeclaringType);
|
// After updating to .NET 9, calling MethodBase.GetCurrentMethod() started crashing when trying
|
||||||
|
// to log methods called from within the OneNote plugin, so we've replaced this instance with typeof(PluginManager).
|
||||||
|
// This should be revised in the future.
|
||||||
|
Log.Exception($"Exception for plugin <{pair.Metadata.Name}> when query <{query}>", e, typeof(PluginManager));
|
||||||
|
|
||||||
return new List<Result>();
|
return new List<Result>();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user