From abfc597f1a7ad93093f7ead616766d56b4333809 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Thu, 3 Oct 2024 10:58:44 -0400 Subject: [PATCH] log error before cleanup in case cleanup fails Signed-off-by: Andrew Azores --- src/main/java/io/cryostat/discovery/DiscoveryPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/cryostat/discovery/DiscoveryPlugin.java b/src/main/java/io/cryostat/discovery/DiscoveryPlugin.java index 037340b58..de331b827 100644 --- a/src/main/java/io/cryostat/discovery/DiscoveryPlugin.java +++ b/src/main/java/io/cryostat/discovery/DiscoveryPlugin.java @@ -118,8 +118,8 @@ public void prePersist(DiscoveryPlugin plugin) { plugin.delete(); throw new IllegalArgumentException(e); } catch (Exception e) { - plugin.delete(); logger.error("Discovery Plugin ping failed", e); + plugin.delete(); throw e; } }