mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-04-05 17:39:39 -04:00
Handle general exceptions during plugin loading.
This commit is contained in:
parent
95db12de72
commit
62dd6730e8
@ -85,12 +85,20 @@ namespace Observatory.PluginManagement
|
||||
errorList.Add((FormatErrorMessage(ex), ex.StackTrace));
|
||||
errorPlugins.Add(plugin);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
errorList.Add(($"{plugin.ShortName}: {ex.Message}", ex.StackTrace));
|
||||
errorPlugins.Add(plugin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
notifyPlugins.RemoveAll(n => errorPlugins.Contains(n.plugin));
|
||||
|
||||
core.Notification += pluginHandler.OnNotificationEvent;
|
||||
|
||||
if (errorList.Any())
|
||||
ErrorReporter.ShowErrorPopup("Plugin Load Error" + (errorList.Count > 1 ? "s" : String.Empty), errorList);
|
||||
}
|
||||
|
||||
private static string FormatErrorMessage(PluginException ex)
|
||||
|
Loading…
x
Reference in New Issue
Block a user