Plugins: less confusing message, fix CNFE by catch and ignore on delete.

This commit is contained in:
sponge
2012-03-19 01:46:47 +00:00
parent 8ca5591933
commit d1ed30e79c
4 changed files with 15 additions and 4 deletions

View File

@ -1,7 +1,6 @@
package net.i2p.router.web;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@ -88,6 +87,15 @@ public class ConfigClientsHandler extends FormHandler {
} else {
try {
PluginStarter.stopPlugin(_context, app);
} catch (ClassNotFoundException cnfe) {
// don't complain here. Some plugins need to be ran to be deleted.
// I tried to check to see if the plugin was ran elsewhere,
// and it sait it was when it was not. -- Sponge
} catch (Throwable e) {
addFormError(_("Error stopping plugin {0}", app) + ": " + e);
_log.error("Error stopping plugin " + app, e);
}
try {
PluginStarter.deletePlugin(_context, app);
addFormNotice(_("Deleted plugin {0}", app));
} catch (Throwable e) {