mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 03:07:56 +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)
|
||||
{
|
||||
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>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user