From 757c482285dcf2bac292afae3a220351e2f2e8ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 21 Nov 2012 22:36:06 +0100 Subject: [PATCH] Catch all exceptions when processing an FCP command. --- src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java b/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java index b3222be..c1ed953 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java +++ b/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java @@ -27,7 +27,6 @@ import net.pterodactylus.sone.core.Core; import net.pterodactylus.sone.freenet.fcp.Command.AccessType; import net.pterodactylus.sone.freenet.fcp.Command.ErrorResponse; import net.pterodactylus.sone.freenet.fcp.Command.Response; -import net.pterodactylus.sone.freenet.fcp.FcpException; import net.pterodactylus.util.logging.Logging; import net.pterodactylus.util.validation.Validation; import freenet.pluginmanager.FredPluginFCP; @@ -172,9 +171,9 @@ public class FcpInterface { try { Response response = command.execute(parameters, data, AccessType.values()[accessType]); sendReply(pluginReplySender, identifier, response); - } catch (FcpException fe1) { + } catch (Exception e1) { logger.log(Level.WARNING, "Could not process FCP command “%s”.", command); - sendReply(pluginReplySender, identifier, new ErrorResponse("Error executing command: " + fe1.getMessage())); + sendReply(pluginReplySender, identifier, new ErrorResponse("Error executing command: " + e1.getMessage())); } } catch (PluginNotFoundException pnfe1) { logger.log(Level.WARNING, "Could not find destination plugin: " + pluginReplySender); -- 2.7.4