Parcourir la source

PluginManager now catches exceptions thrown when processEvent calls are forwarded


git-svn-id: http://svn.dmdirc.com/trunk@2296 00569f92-eb28-0410-84fd-f71c24880f
tags/0.5.5
Shane Mc Cormack il y a 17 ans
Parent
révision
bb5180a4d8
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5
    1
      src/com/dmdirc/plugins/PluginManager.java

+ 5
- 1
src/com/dmdirc/plugins/PluginManager.java Voir le fichier

@@ -322,7 +322,11 @@ public class PluginManager {
322 322
 		for (String pluginName : knownPlugins.keySet()) {
323 323
 			final Plugin plugin = knownPlugins.get(pluginName);
324 324
 			if (plugin instanceof EventPlugin && plugin.isActive()) {
325
-				((EventPlugin)plugin).processEvent(type, format, arguments);
325
+				try {
326
+					((EventPlugin)plugin).processEvent(type, format, arguments);
327
+				} catch (Exception e) {
328
+					Logger.userError(ErrorLevel.LOW, "Error with processEvent for "+pluginName+" ("+type+") - "+e.getMessage());
329
+				}
326 330
 			}
327 331
 		}
328 332
 	}

Chargement…
Annuler
Enregistrer