mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-27 10:59:18 +01:00
[Fools23] Add exception handling to the activation of AU plugins.
Also changed Hey, Dalamud! to let FoolsManager... manage the exception.
This commit is contained in:
parent
5e4e530cfe
commit
41944452ae
2 changed files with 10 additions and 3 deletions
|
|
@ -188,8 +188,15 @@ internal class FoolsManager : IDisposable, IServiceType
|
|||
return;
|
||||
}
|
||||
|
||||
var pluginInstance = (IFoolsPlugin)Activator.CreateInstance(pluginMetadata.Type);
|
||||
this.ActivatedPlugins.Add(plugin, pluginInstance);
|
||||
try
|
||||
{
|
||||
var pluginInstance = (IFoolsPlugin)Activator.CreateInstance(pluginMetadata.Type);
|
||||
this.ActivatedPlugins.Add(plugin, pluginInstance);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(e, "There was an exception while activating plugin {0}", plugin);
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public class HeyDalamudPlugin : IFoolsPlugin
|
|||
{
|
||||
Chat.Print(PluginName, "Error",
|
||||
"Could not start voice recognition. Please make sure that you have the American English Windows Language Pack installed.");
|
||||
Log.Error(ex, "Could not init voice recognition");
|
||||
throw new Exception("Could not init voice recognition", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue